Skip to content

DataAdapter.trashSystem method

DataAdapter › trashSystem

Official

Try moving to system trash.

Signature:

trashSystem(normalizedPath: string): Promise<boolean>

Parameters:

ParameterTypeDescription
normalizedPathstringpath to file/folder, use {@link normalizePath} to normalize beforehand.

Returns: Promise<boolean> — true if successful. This can fail if the system trash is disabled.

Example:

if (!(await adapter.trashSystem(path))) {
await adapter.trashLocal(path);
}