Table of Contents

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

int

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

int

GetFile(int)

Returns the name of the file at index idx.

public string GetFile(int idx)

Parameters

idx int

Returns

string

GetFileCount()

Returns the number of files in this directory.

public int GetFileCount()

Returns

int

GetFileImportIsValid(int)

Returns true if the file at index idx imported properly.

public bool GetFileImportIsValid(int idx)

Parameters

idx int

Returns

bool

GetFilePath(int)

Returns the path to the file at index idx.

public string GetFilePath(int idx)

Parameters

idx int

Returns

string

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

string

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

string

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

StringName

GetName()

Returns the name of this directory.

public string GetName()

Returns

string

GetParent()

Returns the parent directory for this directory or null if called on a directory at res:// or user://.

public EditorFileSystemDirectory GetParent()

Returns

EditorFileSystemDirectory

GetPath()

Returns the path to this directory.

public string GetPath()

Returns

string

GetSubdir(int)

Returns the subdirectory at index idx.

public EditorFileSystemDirectory GetSubdir(int idx)

Parameters

idx int

Returns

EditorFileSystemDirectory

GetSubdirCount()

Returns the number of subdirectories in this directory.

public int GetSubdirCount()

Returns

int

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_name

Name of the method to check for.

Returns

bool

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_name

Name of the signal to check for.

Returns

bool

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_name

Name of the method to invoke.

args NativeVariantPtrArgs

Arguments to use with the invoked method.

ret godot_variant

Value returned by the invoked method.

Returns

bool