summaryrefslogtreecommitdiffstats
path: root/editor/editor_file_system.h
diff options
context:
space:
mode:
Diffstat (limited to 'editor/editor_file_system.h')
-rw-r--r--editor/editor_file_system.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/editor/editor_file_system.h b/editor/editor_file_system.h
index 7120a68b39..11573ef0d7 100644
--- a/editor/editor_file_system.h
+++ b/editor/editor_file_system.h
@@ -180,6 +180,7 @@ class EditorFileSystem : public Node {
EditorFileSystemDirectory *new_filesystem = nullptr;
ScannedDirectory *first_scan_root_dir = nullptr;
+ bool filesystem_changed_queued = false;
bool scanning = false;
bool importing = false;
bool first_scan = true;
@@ -189,6 +190,7 @@ class EditorFileSystem : public Node {
bool revalidate_import_files = false;
int nb_files_total = 0;
+ void _notify_filesystem_changed();
void _scan_filesystem();
void _first_scan_filesystem();
void _first_scan_process_scripts(const ScannedDirectory *p_scan_dir, List<String> &p_gdextension_extensions, HashSet<String> &p_existing_class_names, HashSet<String> &p_extensions);
@@ -239,7 +241,7 @@ class EditorFileSystem : public Node {
bool _find_file(const String &p_file, EditorFileSystemDirectory **r_d, int &r_file_pos) const;
- void _scan_fs_changes(EditorFileSystemDirectory *p_dir, ScanProgress &p_progress);
+ void _scan_fs_changes(EditorFileSystemDirectory *p_dir, ScanProgress &p_progress, bool p_recursive = true);
void _delete_internal_files(const String &p_file);
int _insert_actions_delete_files_directory(EditorFileSystemDirectory *p_dir);
@@ -324,6 +326,19 @@ class EditorFileSystem : public Node {
HashSet<String> group_file_cache;
HashMap<String, String> file_icon_cache;
+ struct CopiedFile {
+ String from;
+ String to;
+ };
+
+ bool refresh_queued = false;
+ HashSet<ObjectID> folders_to_sort;
+
+ Error _copy_file(const String &p_from, const String &p_to);
+ bool _copy_directory(const String &p_from, const String &p_to, List<CopiedFile> *p_files);
+ void _queue_refresh_filesystem();
+ void _refresh_filesystem();
+
struct ImportThreadData {
const ImportFile *reimport_files;
int reimport_from;
@@ -378,6 +393,8 @@ public:
void move_group_file(const String &p_path, const String &p_new_path);
Error make_dir_recursive(const String &p_path, const String &p_base_path = String());
+ Error copy_file(const String &p_from, const String &p_to);
+ Error copy_directory(const String &p_from, const String &p_to);
static bool _should_skip_directory(const String &p_path);