Closed Bug 339546 Opened 18 years ago Closed 7 months ago

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


(Core :: XPCOM, enhancement)






(Reporter: mimecuvalo, Unassigned)


User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20060426 Firefox/
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20060426 Firefox/

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 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;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

Closed: 7 months ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.