TrashOptions

Flags to rule the trashing behavior.

Valid only for freedesktop environments.

Values

ValueMeaning
none0

No options. Just move file to user home trash directory not paying attention to partition where file resides.

fallbackToUserDir1

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.

fallbackToHomeDir2

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.

useTopDirs4

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.

checkStickyBit8

Whether to check presence of 'sticky bit' on $topdir/.Trash directory.

Makes sense only in conjunction with useTopDirs.

all(TrashOptions.fallbackToUserDir | TrashOptions.fallbackToHomeDir | TrashOptions.checkStickyBit | TrashOptions.useTopDirs)

All flags set.

See Also

Meta