Lightroom SDK: LrFtp.parent( ftpPath )

  • 2
  • Idea
  • Updated 7 years ago
There is no proper way to get the parent of a remote dir or file: LrPathUtils.parent returns a platform file-system normalized path (I dont remember that from earlier), and so shouldn't be used directly.

So, I suggest an ftp equivalent of the lr-path-utils parent function.

Useful for checking if the dir exists where a file is going to be put, and for computing new paths based on old paths, or getting the parent path to use in the ftp-connection.

PS - my present workaround:

parent = replaceBackSlashesWithForwardSlashes( LrPathUtils.parent( ftpPath ) )

Although it works just fine, its unnerving to be using something clearly designed for the local file-system to create remote (ftp) paths.
Photo of Rob Cole

Rob Cole

  • 4831 Posts
  • 370 Reply Likes

Posted 7 years ago

  • 2

Be the first to post a reply!