Skip to content

ElectronShell.trashItem method

ElectronShell › trashItem

Unofficial

Moves a path to the OS-specific trash location (Trash on macOS, Recycle Bin on Windows, and a desktop-environment-specific location on Linux).

Signature:

trashItem(path: string): Promise<void>

Parameters:

Parameter Type Description
path string The path to the file.

Returns: Promise<void>A Promise that resolves when the operation has completed and rejects if there was an error while deleting the requested item.