Class EditorFileSystemDirectory
- Namespace
- Godot
- Assembly
- GodotSharpEditor.dll
A more generalized, low-level variation of the directory concept.
public class EditorFileSystemDirectory : GodotObject, IDisposable
- Inheritance
-
EditorFileSystemDirectory
- Implements
- Inherited Members
Constructors
EditorFileSystemDirectory()
public EditorFileSystemDirectory()
Methods
FindDirIndex(string)
Returns the index of the directory with name name
or -1
if not found.
public int FindDirIndex(string name)
Parameters
name
string
Returns
FindFileIndex(string)
Returns the index of the file with name name
or -1
if not found.
public int FindFileIndex(string name)
Parameters
name
string
Returns
GetFile(int)
Returns the name of the file at index idx
.
public string GetFile(int idx)
Parameters
idx
int
Returns
GetFileCount()
Returns the number of files in this directory.
public int GetFileCount()
Returns
GetFileImportIsValid(int)
Returns true
if the file at index idx
imported properly.
public bool GetFileImportIsValid(int idx)
Parameters
idx
int
Returns
GetFilePath(int)
Returns the path to the file at index idx
.
public string GetFilePath(int idx)
Parameters
idx
int
Returns
GetFileScriptClassExtends(int)
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.
public string GetFileScriptClassExtends(int idx)
Parameters
idx
int
Returns
GetFileScriptClassName(int)
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.
public string GetFileScriptClassName(int idx)
Parameters
idx
int
Returns
GetFileType(int)
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"
.
public StringName GetFileType(int idx)
Parameters
idx
int
Returns
GetName()
Returns the name of this directory.
public string GetName()
Returns
GetParent()
Returns the parent directory for this directory or null
if called on a directory at res://
or user://
.
public EditorFileSystemDirectory GetParent()
Returns
GetPath()
Returns the path to this directory.
public string GetPath()
Returns
GetSubdir(int)
Returns the subdirectory at index idx
.
public EditorFileSystemDirectory GetSubdir(int idx)
Parameters
idx
int
Returns
GetSubdirCount()
Returns the number of subdirectories in this directory.
public int GetSubdirCount()
Returns
HasGodotClassMethod(in godot_string_name)
Check if the type contains a method with the given name. This method is used by Godot to check if a method exists before invoking it. Do not call or override this method.
protected override bool HasGodotClassMethod(in godot_string_name method)
Parameters
method
godot_string_nameName of the method to check for.
Returns
HasGodotClassSignal(in godot_string_name)
Check if the type contains a signal with the given name. This method is used by Godot to check if a signal exists before raising it. Do not call or override this method.
protected override bool HasGodotClassSignal(in godot_string_name signal)
Parameters
signal
godot_string_nameName of the signal to check for.
Returns
InvokeGodotClassMethod(in godot_string_name, NativeVariantPtrArgs, out godot_variant)
Invokes the method with the given name, using the given arguments. This method is used by Godot to invoke methods from the engine side. Do not call or override this method.
protected override bool InvokeGodotClassMethod(in godot_string_name method, NativeVariantPtrArgs args, out godot_variant ret)
Parameters
method
godot_string_nameName of the method to invoke.
args
NativeVariantPtrArgsArguments to use with the invoked method.
ret
godot_variantValue returned by the invoked method.