Enum TrashOptions

Flags to rule the trashing behavior.

enum TrashOptions : int { ... }

Valid only for freedesktop environments.

Enum members

NameDescription
all All flags set.
checkStickyBit Whether to check presence of 'sticky bit' on $topdir/.Trash directory.

Makes sense only in conjunction with useTopDirs.

fallbackToHomeDir If file that needs to be deleted resides on non-home partition and checks for top trash directories failed, fallback to home trash directory.

Makes sense only in conjunction with useTopDirs.

fallbackToUserDir If file that needs to be deleted resides on non-home partition and top trash directory ($topdir/.Trash/$uid) failed some check, fallback to user top trash directory ($topdir/.Trash-$uid).

Makes sense only in conjunction with useTopDirs.

none No options. Just move file to user home trash directory not paying attention to partition where file resides.
useTopDirs Whether to use top trash directories at all.

If no fallbackToUserDir nor fallbackToHomeDir flags are set, and file that needs to be deleted resides on non-home partition, and top trash directory ($topdir/.Trash/$uid) failed some check, exception will be thrown. This can be used to report errors to administrator or user.

See Also

Trash specification.