mirror of
https://github.com/electron/electron.git
synced 2026-02-19 03:14:51 -05:00
docs: document that shell.trashItem requires backslashes (#49479)
docs: Update shell.md: Document that shell.trashItem requires backslashes In Windows many functions relating to files (e.g. shell.openItem, the Node fs functions, as well as native Win32 APIs) will accept either type of slash / or \ as a folder separator. shell.trashItem does not work with / as folder separator in Windows. This documentation change explains that. See also: https://github.com/electron/electron/issues/28831 Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: sam marshall <s.marshall@open.ac.uk>
This commit is contained in:
@@ -58,6 +58,10 @@ Rejects if there was an error while deleting the requested item.
|
||||
This moves a path to the OS-specific trash location (Trash on macOS, Recycle
|
||||
Bin on Windows, and a desktop-environment-specific location on Linux).
|
||||
|
||||
The path must use the default path separator for the platform (backslash on
|
||||
Windows). Use `path.resolve()` from the `node:path` module to ensure correct
|
||||
handling on all filesystems.
|
||||
|
||||
### `shell.beep()`
|
||||
|
||||
Play the beep sound.
|
||||
|
||||
Reference in New Issue
Block a user