Lightroom SDK: LrFileUtils.moveToTrash - says file was moved to trash but was permanently deleted.

  • 1
  • Problem
  • Updated 7 years ago
If file being deleted is on a camera card, LrFileUtils.moveToTrash returns true, which supposedly indicates file was successfully moved to the recycle bin, but the deleted files are permanently deleted (i.e. *not* in recycle bin).

I'd like to see this function modified:

LrFileUtils.moveToTrash( file, okToPermanentlyDeleteInstead ), and return a status indicating whether it was deleted, *really* moved to trash, or neither.

Thus one could write code that reports accurate status, and has all the info needed to make properly informed decisions...

At a minimum, the documentation should be updated:

This function will fail under the following circumstances:
- file is on network drive
(any others?)

This function will report wrong status under the following circumstances:
- file is on card
(any others?)
Photo of Rob Cole

Rob Cole

  • 4831 Posts
  • 386 Reply Likes

Posted 7 years ago

  • 1

Be the first to post a reply!