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
namestring
Returns
FindFileIndex(string)
Returns the index of the file with name name or -1 if not found.
public int FindFileIndex(string name)
Parameters
namestring
Returns
GetFile(int)
Returns the name of the file at index idx.
public string GetFile(int idx)
Parameters
idxint
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
idxint
Returns
GetFilePath(int)
Returns the path to the file at index idx.
public string GetFilePath(int idx)
Parameters
idxint
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
idxint
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
idxint
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
idxint
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
idxint
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
methodgodot_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
signalgodot_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
methodgodot_string_nameName of the method to invoke.
argsNativeVariantPtrArgsArguments to use with the invoked method.
retgodot_variantValue returned by the invoked method.