Move files to trash can (aka recycle bin) programmatically
To use this package, run the following command in your project's root directory:
Put the following dependency into your project's dependences section:
Trash can operations implemented in D programming language. The moveToTrash function places a passed file or directory to trash can. The Trashcan class allows to list trashcan contents, restore or delete items.
Platform support and implementation details
On Freedesktop environments (e.g. GNU/Linux) the library follows Trash Can Specification.
On OSX FSMoveObjectToTrashSync is used to move files to trash. Listing, deleting and undeleting items in the trash can are not currently supported on macOS.
Other platforms are not supported.
Currently missing features
- Notifying changes in trash can contents (or at least providing the data required to implement this feature for the library user).
Run to put file or directory to trash can:
dub examples/put.d path/to/file
Interactively delete items from trashcan or restore them to their original location.
- Registered by Roman Chistokhodov
- 0.3.0 released 2 years ago
- Copyright © 2016, Roman Chistokhodov
- xdgpaths, inilike, volumeinfo
0.3.2 2022-Jun-10 0.3.1 2022-May-21 0.3.0 2020-Sep-23 0.2.4 2018-May-05 0.2.3 2018-Feb-13
- Download Stats:
0 downloads today
0 downloads this week
2 downloads this month
241 downloads total
- Short URL: