User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:184.108.40.206) Gecko/20060426 Firefox/220.127.116.11 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:18.104.22.168) Gecko/20060426 Firefox/22.214.171.124 It would be good that nsIFile has the ability to move a file to the OS's Recycle Bin/Trash. Or, alternatively, the "Trsh" folder is defined in http://lxr.mozilla.org/seamonkey/source/xpcom/io/nsDirectoryServiceDefs.h but only for the Mac. It would be good to have access to Linux and Windows as well for cross-platform development abilities. The practical use for this is, in my case, I'm developing FireFTP and it acts partially as a File Manager. Currently when deleting files, the user must permanently delete them. Reproducible: Always
I've added this to FireFTP now via jsctypes. See http://www.mozdev.org/source/browse/fireftp/src/content/js/local/localFile.js.diff?r1=1.29;r2=1.30;f=h I still think this should maybe be a part of the core API though.
Severity: normal → enhancement
Component: Networking: File → XPCOM
QA Contact: networking.file → xpcom
Note that this (in *nix world) is highly DE specific (on win+mac, there's only one DE). Also think of cases like remote filesystems, etc. I doubt you wanna implement poper handling for all these individual cases (and the required customizability) into moz core. As that's a quite common topic (for all kind of file managing applications), I'd suggest moving that to an entirely separate library, which can be easily patched or replaced by distros / operators.
You need to log in before you can comment on or make changes to this bug.