pathlib icon indicating copy to clipboard operation
pathlib copied to clipboard

Send to recycling/trash folder

Open nemec opened this issue 6 years ago • 2 comments

In addition to deleting a file, it would be nice to be able to send it to the user's trash folder. The challenge in this one is that various OSes do things differently. Windows has the recycle bin, Linux has the trash folder (which can be in any number of places)

  • [ ] OSX holds it in ~/.Trash folder for main drive, other places for different mount points. Perhaps port the Trash application to C#.
  • [ ] Linus (and others using XDG spec) generally place it in .local/share/Trash, or mount-local directory.
  • [ ] Windows will probably use a PInvoke to native Win32 method since the Recycling Bin is a special GUID folder.
  • [ ] In case none of these work on the user's machine, need a good way to indicate failure. Perhaps by return value.

nemec avatar Nov 09 '17 04:11 nemec