Description

Move files to trash can programmatically

Package Information

Version0.2.1 (2016-Sep-26)
Repositoryhttps://github.com/FreeSlave/trashcan
LicenseBSL-1.0
CopyrightCopyright © 2016, Roman Chistokhodov
AuthorsRoman Chistokhodov
Registered byRoman Chistokhodov
Sub packages
./examples/put/
[directory based sub package]
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

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.1 0.2.0 0.1.0 ~master