EditorFileSystemDirectory
繼承: Object
資源檔系統的目錄。
說明
目錄概念的一個更概括的、低級的概念。
方法
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 |
方法說明
int find_dir_index(name: String) const 🔗
返回名為 name 的目錄索引,如果未找到返回 -1。
int find_file_index(name: String) const 🔗
返回名為 name 的檔索引,如果未找到返回 -1。
String get_file(idx: int) const 🔗
返回索引 idx 處的檔案名。
返回目錄裡檔的數量。
bool get_file_import_is_valid(idx: int) const 🔗
如果索引 idx 處的檔正確匯入,則返回 true。
String get_file_path(idx: int) const 🔗
返回索引 idx 處的檔所在路徑。
String get_file_script_class_extends(idx: int) const 🔗
返回在索引 idx 的檔中定義的腳本類的基底類別。如果該檔未使用 class_name 語法定義腳本類,則返回空字串。
String get_file_script_class_name(idx: int) const 🔗
返回索引 idx 處檔中定義的腳本類的名稱。如果檔沒有使用 class_name 語法定義腳本類,這將返回一個空字串。
StringName get_file_type(idx: int) const 🔗
返回在索引 idx 處檔案的資源型別。返回的是類似 "Resource" 和 "GDScript" 的字串,而不是類似 ".gd" 的檔案副檔名。
返回這個目錄的名字。
EditorFileSystemDirectory get_parent() 🔗
返回這個目錄的上層目錄,如果在 res:// 或 user:// 調用這個方法,將會返回 null。
返回這個目錄的路徑。
EditorFileSystemDirectory get_subdir(idx: int) 🔗
返回在索引 idx 處的子目錄。
int get_subdir_count() const 🔗
返回這個目錄的子目錄的數量。