Up to date
This page is up to date for Redot 4.3
.
If you still find outdated information, please create an issue.
EditorFileSystemDirectoryΒΆ
Inherits: Object
A directory for the resource filesystem.
DescriptionΒΆ
A more generalized, low-level variation of the directory concept.
MethodsΒΆ
find_dir_index(name: String) const |
|
find_file_index(name: String) const |
|
get_file_count() const |
|
get_file_import_is_valid(idx: int) const |
|
get_file_path(idx: int) const |
|
get_file_script_class_extends(idx: int) const |
|
get_file_script_class_name(idx: int) const |
|
get_file_type(idx: int) const |
|
get_name() |
|
get_path() const |
|
get_subdir(idx: int) |
|
get_subdir_count() const |
Method DescriptionsΒΆ
int find_dir_index(name: String) const π
Returns the index of the directory with name name
or -1
if not found.
int find_file_index(name: String) const π
Returns the index of the file with name name
or -1
if not found.
String get_file(idx: int) const π
Returns the name of the file at index idx
.
int get_file_count() const π
Returns the number of files in this directory.
bool get_file_import_is_valid(idx: int) const π
Returns true
if the file at index idx
imported properly.
String get_file_path(idx: int) const π
Returns the path to the file at index idx
.
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.
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.
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 "GDScript"
, not a file extension such as ".gd"
.
Returns the name of this directory.
EditorFileSystemDirectory get_parent() π
Returns the parent directory for this directory or null
if called on a directory at res://
or user://
.
Returns the path to this directory.
EditorFileSystemDirectory get_subdir(idx: int) π
Returns the subdirectory at index idx
.
int get_subdir_count() const π
Returns the number of subdirectories in this directory.