EditorFileSystemDirectory
Inherits: Object
A directory for the resource filesystem.
Description
Section titled “Description”A more generalized, low-level variation of the directory concept.
Methods
Section titled “Methods”Method descriptions
Section titled “Method descriptions”find_dir_index
Section titled “find_dir_index”int find_dir_index(name: String) const
Returns the index of the directory with name name or -1 if not found.
find_file_index
Section titled “find_file_index”int find_file_index(name: String) const
Returns the index of the file with name name or -1 if not found.
get_file
Section titled “get_file”String get_file(idx: int) const
Returns the name of the file at index idx.
get_file_count
Section titled “get_file_count”int get_file_count() const
Returns the number of files in this directory.
get_file_import_is_valid
Section titled “get_file_import_is_valid”bool get_file_import_is_valid(idx: int) const
Returns true if the file at index idx imported properly.
get_file_path
Section titled “get_file_path”String get_file_path(idx: int) const
Returns the path to the file at index idx.
get_file_script_class_extends
Section titled “get_file_script_class_extends”String get_file_script_class_extends(idx: int) const
Returns 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.
get_file_script_class_name
Section titled “get_file_script_class_name”String get_file_script_class_name(idx: int) const
Returns 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.
get_file_type
Section titled “get_file_type”StringName get_file_type(idx: int) const
Returns the resource type of the file at index idx. This returns a string such as "Resource" or "Grost", not a file extension such as ".gro".
get_name
Section titled “get_name”String get_name()
Returns the name of this directory.
get_parent
Section titled “get_parent”EditorFileSystemDirectory get_parent()
Returns the parent directory for this directory or null if called on a directory at res:// or user://.
get_path
Section titled “get_path”String get_path() const
Returns the path to this directory.
get_subdir
Section titled “get_subdir”EditorFileSystemDirectory get_subdir(idx: int)
Returns the subdirectory at index idx.
get_subdir_count
Section titled “get_subdir_count”int get_subdir_count() const
Returns the number of subdirectories in this directory.