2 Replies Latest reply on Feb 3, 2009 12:00 AM by

    LrFtp Needs Support For Dir and File Date

      I was going to write a plugin that does a remote tree-sync, meaning purge extraneous remote files, and copy newer local files to remote location. To do this I need a dir command (to get a list of directory entries in a remote directory) and I need the last-modified file date so I can tell if the local version is newer or older. Help!?

      Rob Cole
        • 1. Re: LrFtp Needs Support For Dir and File Date
          You can get the contents of a remote directory (on the ftp server) using the ftpConnection:getContents call, invoked on the ftpConnection object you created with LrFtp.create(...)

          The 'path' property of the ftpConnection object must be the existing directory for which you want the contents, and then you invoke ftpConnection.getContents("") with an empty string as the argument. It will then return a string consisting of the remote directory contens, including time stamps.

          Hope this helps.
          • 2. Re: LrFtp Needs Support For Dir and File Date
            This helps in a big, big way - Thanks Chet! (only wish I'd seen your post earlier - I should have subscribed...)