EditorFileSystemDirectory
继承: Object
A directory for the resource filesystem.
描述
A more generalized, low-level variation of the directory concept.
方法
int | find_dir_index ( name: String ) const1 |
int | find_file_index ( name: String ) const1 |
String | get_file ( idx: int ) const1 |
int | get_file_count ( ) const1 |
bool | get_file_import_is_valid ( idx: int ) const1 |
String | get_file_path ( idx: int ) const1 |
String | get_file_script_class_extends ( idx: int ) const1 |
String | get_file_script_class_name ( idx: int ) const1 |
StringName | get_file_type ( idx: int ) const1 |
String | get_name ( ) |
EditorFileSystemDirectory | get_parent ( ) |
String | get_path ( ) const1 |
EditorFileSystemDirectory | get_subdir ( idx: int ) |
int | get_subdir_count ( ) const1 |
方法说明
int find_dir_index ( name: String ) const1
Returns the index of the directory with name name or -1 if not found.
int find_file_index ( name: String ) const1
Returns the index of the file with name name or -1 if not found.
String get_file ( idx: int ) const1
Returns the name of the file at index idx.
Returns the number of files in this directory.
bool get_file_import_is_valid ( idx: int ) const1
Returns true if the file at index idx imported properly.
String get_file_path ( idx: int ) const1
Returns the path to the file at index idx.
String get_file_script_class_extends ( idx: int ) const1
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 ) const1
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 ) const1
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".
String get_name ( )
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 ( ) const1
Returns the number of subdirectories in this directory.
本方法通常需要用户覆盖才能生效。
本方法无副作用,不会修改该实例的任何成员变量。
本方法除了能接受在此处描述的参数外,还能够继续接受任意数量的参数。
本方法用于构造某个类型。
调用本方法无需实例,可直接使用类名进行调用。
本方法描述的是使用本类型作为左操作数的有效运算符。
这个值是由下列位标志构成位掩码的整数。
无返回值。