Closed Bug 339546 Opened 19 years ago Closed 1 year ago

nsIFile.remove should allow option to send to Recycle Bin/Trash

Categories

(Core :: XPCOM, enhancement)

enhancement

Tracking

()

RESOLVED WONTFIX

People

(Reporter: mimecuvalo, Unassigned)

Details

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.3) Gecko/20060426 Firefox/1.5.0.3 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.3) Gecko/20060426 Firefox/1.5.0.3 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.
Component: XPCOM → Networking: File
QA Contact: xpcom → networking.file
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.
Severity: normal → S3

We don't support XUL addons anymore

Status: UNCONFIRMED → RESOLVED
Closed: 1 year ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.