Interface IFolderInfo
- Namespace
- Cobilas.GodotEngine.Utility.IO.Interfaces
- Assembly
- com.cobilas.godot.utility.dll
Represents information about a folder/directory and provides operations for folder management.
public interface IFolderInfo : IDataInfo, IDisposable, IFormattable, IEnumerable<IDataInfo>, IEnumerable
- Inherited Members
Remarks
This interface extends IDataInfo and IEnumerable<T> to provide folder-specific functionality including enumeration of contents and folder manipulation operations.
Properties
DataCount
Gets the total number of data items contained within the folder.
long DataCount { get; }
Property Value
- long
The count of all data items (files and subfolders) in the folder.
Methods
CreateArchive(string?)
Creates a new archive file with the specified name.
IDataInfo CreateArchive(string? name)
Parameters
namestringThe name of the archive file to create.
Returns
CreateFolder(string?)
Creates a new subfolder with the specified name.
IDataInfo CreateFolder(string? name)
Parameters
namestringThe name of the subfolder to create.
Returns
Existe(string?)
Checks whether a data item with the specified name exists in this folder.
bool Existe(string? name)
Parameters
namestringThe name of the data item to check.
Returns
- bool
trueif a data item with the specified name exists; otherwise,false.
GetArchives()
Gets all archive files contained within this folder.
IArchiveInfo[] GetArchives()
Returns
- IArchiveInfo[]
An array of IArchiveInfo representing all archive files.
GetFolders()
Gets all subfolders contained within this folder.
IFolderInfo[] GetFolders()
Returns
- IFolderInfo[]
An array of IFolderInfo representing all subfolders.
Move(string?)
Moves the entire folder to a new location.
bool Move(string? destinationPath)
Parameters
destinationPathstringThe destination path where the folder will be moved.
Returns
- bool
trueif the move operation succeeded; otherwise,false.
MoveTo(string?, string?)
Moves a data item from this folder to another location.
bool MoveTo(string? name, string? path)
Parameters
namestringThe name of the data item to move.
pathstringThe destination path where the item will be moved.
Returns
- bool
trueif the move operation succeeded; otherwise,false.
Refresh()
Refreshes the folder contents, updating the internal state to reflect any external changes.
void Refresh()
RemoveArchive(string?)
Removes an archive file with the specified name.
bool RemoveArchive(string? name)
Parameters
namestringThe name of the archive to remove.
Returns
- bool
trueif the removal succeeded; otherwise,false.
RemoveFolder(string?)
Removes a subfolder with the specified name.
bool RemoveFolder(string? name)
Parameters
namestringThe name of the folder to remove.
Returns
- bool
trueif the removal succeeded; otherwise,false.
RenameArchive(string?, string?)
Renames an archive file within this folder.
bool RenameArchive(string? oldName, string? newName)
Parameters
oldNamestringThe current name of the archive to rename.
newNamestringThe new name for the archive.
Returns
- bool
trueif the rename operation succeeded; otherwise,false.
RenameFolder(string?, string?)
Renames a subfolder within this folder.
bool RenameFolder(string? oldName, string? newName)
Parameters
oldNamestringThe current name of the folder to rename.
newNamestringThe new name for the folder.
Returns
- bool
trueif the rename operation succeeded; otherwise,false.