1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to? How can I test "if isdir"/"if isfile" tests on an HTTP site?

Discussion in 'Support' started by Steve Fabian, Apr 10, 2013.

  1. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,523
    Likes Received:
    4
    When using HTTP, both if isdir and if isfile always report the specified object does not exist; if exist always reports that it does exist. I found no method to determine whether or not a file or directory exists without attempting to copy all of its content. Is this a limitation of HTTP, or is it technically possible to make ISDIR / ISFILE tests?
     
  2. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,730
    Likes Received:
    80
    Cannot be done -- you cannot retrieve directory contents with HTTP.
     
  3. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,523
    Likes Received:
    4
    That's why FTP was invented, so remote users could browse, and download only what they need... and do it with a protocol with a much lower transmission error probability. My question would not have arisen if I were not forced to use HTTP with some sites that do not support FTP...
     

Share This Page