reckfellENGINE

EditorFileSystem

Resource filesystem, as the editor sees it.

On this page
class EditorFileSystemReckfellSharpEditorInherits Entity

Resource filesystem, as the editor sees it.

This object holds information of all resources in the filesystem, their types, etc. Note: This class shouldn't be instantiated directly. Instead, access the singleton using EditorInterface.GetResourceFilesystem.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Methods11

GetFileTypestring
# GetFileType
C#
public string GetFileType(string path);

Returns the resource type of the file, given the full path. This returns a string such as "Resource" or "C#", not a file extension such as ".cs".

Parameters
NameTypeDefault
pathstring—
Returns string
GetFilesystemEditorFileSystemDirectory
# GetFilesystem
C#
public EditorFileSystemDirectory GetFilesystem();

Gets the root directory object.

Returns EditorFileSystemDirectory
GetFilesystemPathEditorFileSystemDirectory
# GetFilesystemPath
C#
public EditorFileSystemDirectory GetFilesystemPath(string path);

Returns a view into the filesystem at path.

Parameters
NameTypeDefault
pathstring—
Returns EditorFileSystemDirectory
GetScanningProgressfloat
# GetScanningProgress
C#
public float GetScanningProgress();

Returns the scan progress for 0 to 1 if the FS is being scanned.

Returns float
IsImportingbool
# IsImporting
C#
public bool IsImporting();

Returns true if resources are currently being imported.

Returns bool
IsScanningbool
# IsScanning
C#
public bool IsScanning();

Returns true if the filesystem is being scanned.

Returns bool
ReimportFiles2 overloads
# ReimportFiles · 1/2
C#
public void ReimportFiles(ReadOnlySpan<string> files);

Reimports a set of files. Call this if these files or their .import files were directly edited by script or an external program. If the file type changed or the file was newly created, use EditorFileSystem.UpdateFile or EditorFileSystem.Scan. Note: This function blocks until the import is finished. However, the main loop iteration, including timers and Entity._Process, will occur during the import process due to progress bar updates. Avoid calls to EditorFileSystem.ReimportFiles or EditorFileSystem.Scan while an import is in progress.

Parameters
NameTypeDefault
filesReadOnlySpan<string>—
# ReimportFiles · 2/2
C#
public void ReimportFiles(string[] files);

Reimports a set of files. Call this if these files or their .import files were directly edited by script or an external program. If the file type changed or the file was newly created, use EditorFileSystem.UpdateFile or EditorFileSystem.Scan. Note: This function blocks until the import is finished. However, the main loop iteration, including timers and Entity._Process, will occur during the import process due to progress bar updates. Avoid calls to EditorFileSystem.ReimportFiles or EditorFileSystem.Scan while an import is in progress.

Parameters
NameTypeDefault
filesstring[]—
Scanvoid
# Scan
C#
public void Scan();

Scan the filesystem for changes.

ScanSourcesvoid
# ScanSources
C#
public void ScanSources();

Check if the source of any imported resource changed.

UpdateFilevoid
# UpdateFile
C#
public void UpdateFile(string path);

Add a file in an existing directory, or schedule file information to be updated on editor restart. Can be used to update text files saved by an external program. This will not import the file. To reimport, call EditorFileSystem.ReimportFiles or EditorFileSystem.Scan methods.

Parameters
NameTypeDefault
pathstring—

Signals and events6

FilesystemChangedEvent
# FilesystemChanged
C#
public event Action FilesystemChanged;

Emitted if the filesystem changed.

ResourcesReimportedEvent
# ResourcesReimported
C#
public event EditorFileSystem.ResourcesReimportedEventHandler ResourcesReimported;

Emitted if a resource is reimported.

Handler parameters
NameTypeDefault
resourcesstring[]—
ResourcesReimportingEvent
# ResourcesReimporting
C#
public event EditorFileSystem.ResourcesReimportingEventHandler ResourcesReimporting;

Emitted before a resource is reimported.

Handler parameters
NameTypeDefault
resourcesstring[]—
ResourcesReloadEvent
# ResourcesReload
C#
public event EditorFileSystem.ResourcesReloadEventHandler ResourcesReload;

Emitted if at least one resource is reloaded when the filesystem is scanned.

Handler parameters
NameTypeDefault
resourcesstring[]—
ScriptClassesUpdatedEvent
# ScriptClassesUpdated
C#
public event Action ScriptClassesUpdated;

Emitted when the list of global script classes gets updated.

SourcesChangedEvent
# SourcesChanged
C#
public event EditorFileSystem.SourcesChangedEventHandler SourcesChanged;

Emitted if the source of any imported file changed.

Handler parameters
NameTypeDefault
existbool—
Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.