From ac07549595d17e93a775e6a6510495df281cce55 Mon Sep 17 00:00:00 2001 From: Lyaaaaaaaaaaaaaaa Date: Wed, 7 Aug 2024 10:47:31 +0200 Subject: [PATCH 1/2] Updated DirUtils to extend EditorPlugin --- src/DirUtils.gd | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/DirUtils.gd b/src/DirUtils.gd index c95ac43..8e86f8c 100644 --- a/src/DirUtils.gd +++ b/src/DirUtils.gd @@ -17,10 +17,12 @@ #-- - 06/08/2024 Lyaaaaa #-- - Renamed cut_file into move_file to be more explicit. #-- +#-- - 07/08/2024 Lyaaaaa +#-- - Now extends EditorPlugin. #------------------------------------------------------------------------------ @tool class_name Dir_Utils -extends DirAccess +extends EditorPlugin static func get_files_names(p_path_to_folder : String, p_get_extension : bool = true) -> PackedStringArray: From 49bd2cde5221541928df239be7725685e93d05bb Mon Sep 17 00:00:00 2001 From: Lyaaaaaaaaaaaaaaa Date: Wed, 7 Aug 2024 10:47:49 +0200 Subject: [PATCH 2/2] Updated test_copy_file in test_dir_utils - Updated test_copy_file to clean afterwards. --- tests/test_dir_utils.gd | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/test_dir_utils.gd b/tests/test_dir_utils.gd index 8f95a09..0c62289 100644 --- a/tests/test_dir_utils.gd +++ b/tests/test_dir_utils.gd @@ -40,6 +40,7 @@ #-- - Updated test_delete to delete all the files declared in files #-- (forgot to update it when added a fourth file in files var). #-- - Updated test_get_folder_size to correctly do its job and to clean his mess. +#-- - Updated test_copy_file to clean afterwards. #------------------------------------------------------------------------------ extends GutTest @@ -232,3 +233,5 @@ func test_copy_file() -> void: var destination_file := FileAccess.open(destination, FileAccess.READ) assert_eq(destination_file.get_as_text(), "content") + + Dir_Utils.delete(destination)