Description

Move files to trash can programmatically

Package Information

Version0.2.2 (2017-Mar-28)
Repository https://github.com/FreeSlave/trashcan
LicenseBSL-1.0
CopyrightCopyright © 2016, Roman Chistokhodov
AuthorsRoman Chistokhodov
Registered byRoman Chistokhodov
Sub packages
trashcan:put
A minimal D application.
Dependencies

xdgpaths

Installation

To use this package, put the following dependency into your project's dependencies section:

dub.json
dub.sdl

Readme

Trash can

Build Status Windows Build Status

Move files and directories to trash can (Recycle bin) in D programming language. Currently it contains only one function moveToTrash which places passed file or directory to trash can.

Platform support

On Freedesktop environments (e.g. GNU/Linux) the library will follow Trash Can Specification.

On Windows SHFileOperation is used.

On OSX FSMoveObjectToTrashSync is used.

Other platforms are not supported.

Future improvements:

  • Interface for observing the trash can contents (something like VFS).
  • Ability to restore deleted files.

Examples

Put to trash can

Run to put file or directory to trash can:

dub run :put -- path/to/file

Available versions

0.2.2 0.2.1 0.2.0 0.1.0 ~master