rob_cole_2221866's profile

4.5K Messages


76.3K Points

Sat, Dec 24, 2011 5:57 AM

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

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?)
No Responses!