Class reference
EditorFileSystemDirectory
Inherits Object
A directory for the resource filesystem.
Description
A more generalized, low-level variation of the directory concept.
Methods
int find_dir_index(String name) const
int find_dir_index(String name) constReturns the index of the directory with name name or -1 if not found.
int find_file_index(String name) const
int find_file_index(String name) constReturns the index of the file with name name or -1 if not found.
String get_file(int idx) const
String get_file(int idx) constReturns the name of the file at index idx.
int get_file_count() const
int get_file_count() constReturns the number of files in this directory.
bool get_file_import_is_valid(int idx) const
bool get_file_import_is_valid(int idx) constReturns true if the file at index idx imported properly.
String get_file_path(int idx) const
String get_file_path(int idx) constReturns the path to the file at index idx.
String get_file_script_class_extends(int idx) const
String get_file_script_class_extends(int idx) constReturns the base class of the script class defined in the file at index idx. If the file doesn't define a script class using the class_name syntax, this will return an empty string.
String get_file_script_class_name(int idx) const
String get_file_script_class_name(int idx) constReturns the name of the script class defined in the file at index idx. If the file doesn't define a script class using the class_name syntax, this will return an empty string.
StringName get_file_type(int idx) const
StringName get_file_type(int idx) constReturns the resource type of the file at index idx. This returns a string such as "Resource" or "GDScript", not a file extension such as ".gd".
String get_name()
String get_name()Returns the name of this directory.
EditorFileSystemDirectory get_parent()
EditorFileSystemDirectory get_parent()Returns the parent directory for this directory or null if called on a directory at res:// or user://.
String get_path() const
String get_path() constReturns the path to this directory.
EditorFileSystemDirectory get_subdir(int idx)
EditorFileSystemDirectory get_subdir(int idx)Returns the subdirectory at index idx.
int get_subdir_count() const
int get_subdir_count() constReturns the number of subdirectories in this directory.