Function moveToTrash

Move file or directory to trash can.

void moveToTrash (
  scope string path,
  TrashOptions options = cast(TrashOptions)15
) @trusted;

Parameters

NameDescription
path Path of item to remove. Must be absolute.
options Control behavior of trashing on freedesktop environments.

Throws

Exception when given path is not absolute or does not exist, or some error occured during operation, or the operation is not supported on the current platform.