[Python-ideas] Adding `pathlib.Path` method that would send file to recycle bin

Ronald Oussoren ronaldoussoren at mac.com
Tue Dec 30 22:36:53 CET 2014

> On 30 Dec 2014, at 00:19, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
> Andrew Barnert wrote:
>> you just look up the name of the trash directory (which I believe
>> is theoretically localized but actually always ~/.Trash on the drive with
>> your user directory, $mnt/.Trash otherwise) and call rename.
> You may also need to invent a unique name if there's already
> a file in the trash with the same name.

And whatever else the api does for you… IMHO its better to use the API for this on OSX, such as FSMoveObjectToTrashSync.


More information about the Python-ideas mailing list