feat: macOS removal fallback when moveItemToTrash fails (#19700)
* feat: macOS removal fallback when moveItemToTrash fails * platform_util shouldn't know about mate::Arguments * pull full_path from args as well
This commit is contained in:
parent
b5798326e8
commit
e1824c00a9
6 changed files with 43 additions and 13 deletions
|
@ -43,11 +43,12 @@ Returns `Promise<void>`
|
|||
|
||||
Open the given external protocol URL in the desktop's default manner. (For example, mailto: URLs in the user's default mail agent).
|
||||
|
||||
### `shell.moveItemToTrash(fullPath)`
|
||||
### `shell.moveItemToTrash(fullPath[, deleteOnFail])`
|
||||
|
||||
* `fullPath` String
|
||||
* `deleteOnFail` Boolean (optional) - Whether or not to unilaterally remove the item if the Trash is disabled or unsupported on the volume. _macOS_
|
||||
|
||||
Returns `Boolean` - Whether the item was successfully moved to the trash.
|
||||
Returns `Boolean` - Whether the item was successfully moved to the trash or otherwise deleted.
|
||||
|
||||
Move the given file to trash and returns a boolean status for the operation.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue