EditorFileSystemDirectory

继承: Object

资源文件系统的目录。

描述

目录概念的更广义的低级变体。

方法


方法说明

int find_dir_index(name: String) const 🔗

返回目录的索引,如果未找到,则返回namename-1


int find_file_index(name: String) const 🔗

如果未找到,则返回带有namename-1的文件索引。


String get_file(idx: int) const 🔗

返回indexidx处的文件名。


int get_file_count() const 🔗

返回此目录中的文件数。


bool get_file_import_is_valid(idx: int) const 🔗

如果索引idx处的文件导入正确,则返回true


String get_file_path(idx: int) const 🔗

返回文件在indexidx处的路径。


String get_file_script_class_extends(idx: int) const 🔗

返回文件中在indexidx处定义的脚本类的基类。如果文件没有使用class_name语法定义脚本类,这将返回一个空字符串。


String get_file_script_class_name(idx: int) const 🔗

返回文件中在indexidx处定义的脚本类的名称。如果文件没有使用class_name语法定义脚本类,这将返回一个空字符串。


StringName get_file_type(idx: int) const 🔗

返回索引idx处文件的资源类型。这将返回一个字符串,例如"Resource""S3Script"不是一个文件扩展名,例如". s3"


String get_name() 🔗

返回此目录的名称。


EditorFileSystemDirectory get_parent() 🔗

返回此目录的父目录,如果在res://user://的目录上调用null


String get_path() const 🔗

返回此目录的路径。


EditorFileSystemDirectory get_subdir(idx: int) 🔗

返回indexidx处的子目录。


int get_subdir_count() const 🔗

返回此目录中的子目录数。