Improve description of move_to_trash()
(cherry picked from commit 1c90b066dd
)
This commit is contained in:
parent
4c9dc78f19
commit
2a7d60111f
1 changed files with 5 additions and 0 deletions
|
@ -787,7 +787,12 @@
|
||||||
<argument index="0" name="path" type="String" />
|
<argument index="0" name="path" type="String" />
|
||||||
<description>
|
<description>
|
||||||
Moves the file or directory to the system's recycle bin. See also [method Directory.remove].
|
Moves the file or directory to the system's recycle bin. See also [method Directory.remove].
|
||||||
|
The method takes only global paths, so you may need to use [method ProjectSettings.globalize_path]. Do not use it for files in [code]res://[/code] as it will not work in exported project.
|
||||||
[b]Note:[/b] If the user has disabled the recycle bin on their system, the file will be permanently deleted instead.
|
[b]Note:[/b] If the user has disabled the recycle bin on their system, the file will be permanently deleted instead.
|
||||||
|
[codeblock]
|
||||||
|
var file_to_remove = "user://slot1.sav"
|
||||||
|
OS.move_to_trash(ProjectSettings.globalize_path(file_to_remove))
|
||||||
|
[/codeblock]
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="move_window_to_foreground">
|
<method name="move_window_to_foreground">
|
||||||
|
|
Loading…
Reference in a new issue