2 Replies Latest reply on Sep 11, 2010 1:33 PM by areohbee

    ftpConnection:exists applied to directory does not work as documented

    areohbee Level 6

      API Doc says it will return 'directory' if a specified directory exists at the ftp-connection path, but what it will do is adjust the path parent-wise until something does exist, then return 'directory'. This is not how it used to work, and is (useful but) not how its documented.


      So, to see if a directory really exists, this code required:


      local t = ftpConnection.path

      local x = ftpConnection:exists( "name" )

      if ftpConnection.path ~= t then -- ancestor directory may exists, but not "name" directory.

           return false


      ... as documented, as before ...