Skip to content

Commit

Permalink
Improve description of move_to_trash()
Browse files Browse the repository at this point in the history
  • Loading branch information
KoBeWi committed Jun 13, 2022
1 parent 8df8fff commit 1c90b06
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions doc/classes/OS.xml
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,12 @@
<argument index="0" name="path" type="String" />
<description>
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.
[codeblock]
var file_to_remove = "user://slot1.sav"
OS.move_to_trash(ProjectSettings.globalize_path(file_to_remove))
[/codeblock]
</description>
</method>
<method name="open_midi_inputs">
Expand Down

0 comments on commit 1c90b06

Please sign in to comment.