Skip to main content

IAltaFolder

An interface in Alta.IO, Alta.Utilities.

A folder in the game's file storage that hands out IAltaFile and child IAltaFolder objects by name. AltaFolder is the disk version.

Properties​

MemberWhat it is
IEnumerable<IAltaFile> AllFiles { get; }Files in this folder.
IEnumerable<IAltaFolder> AllSubFolders { get; }Folders inside this folder.
DirectoryInfo DirectoryInfo { get; }The folder on disk.
string Name { get; }Folder name.
IAltaFolder Parent { get; }The parent folder.
string Path { get; }Full path of the folder.

Methods​

MemberWhat it is
void Delete()Deletes the folder.
Task DeleteAsync()Deletes the folder on a background task.
bool FileExists(string name, out IAltaFile file)True if a file with this name exists, and returns it.
IAltaFile GetFile(string name)Gets a file by name.
IAltaFolder GetSubfolder(string name)Gets a child folder by name.
void RemoveFile(IAltaFile file)Forgets a file. Called by the file when it is deleted.
void RemoveSubFolder(string name)Forgets a child folder by name.
bool SubfolderExists(string name, out IAltaFolder folder)True if a child folder with this name exists, and returns it.
void UnloadAllFiles()Drops the loaded content of every file.

Used in​

Members of other types that take, return or hold a IAltaFolder: