-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdebug.gd
More file actions
34 lines (21 loc) · 764 Bytes
/
debug.gd
File metadata and controls
34 lines (21 loc) · 764 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
extends Window
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(_delta: float) -> void:
pass
func _on_delete_pressed() -> void:
rmdir(OS.get_user_data_dir().path_join("dungeonfy"))
func _on_folder_pressed() -> void:
OS.shell_open(OS.get_user_data_dir().path_join("dungeonfy"))
# modified this time
func rmdir(directory: String) -> void:
var dir = DirAccess.open(directory)
if dir:
dir.include_hidden = true
for file in dir.get_files():
dir.remove(file)
for subdir in dir.get_directories():
rmdir(directory.path_join(subdir))
DirAccess.remove_absolute(directory)