Table of Contents

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

name string

The name of the archive file to create.

Returns

IDataInfo

An IDataInfo representing the newly created archive.

CreateFolder(string?)

Creates a new subfolder with the specified name.

IDataInfo CreateFolder(string? name)

Parameters

name string

The name of the subfolder to create.

Returns

IDataInfo

An IDataInfo representing the newly created folder.

Existe(string?)

Checks whether a data item with the specified name exists in this folder.

bool Existe(string? name)

Parameters

name string

The name of the data item to check.

Returns

bool

true if 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

destinationPath string

The destination path where the folder will be moved.

Returns

bool

true if 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

name string

The name of the data item to move.

path string

The destination path where the item will be moved.

Returns

bool

true if 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

name string

The name of the archive to remove.

Returns

bool

true if the removal succeeded; otherwise, false.

RemoveFolder(string?)

Removes a subfolder with the specified name.

bool RemoveFolder(string? name)

Parameters

name string

The name of the folder to remove.

Returns

bool

true if the removal succeeded; otherwise, false.

RenameArchive(string?, string?)

Renames an archive file within this folder.

bool RenameArchive(string? oldName, string? newName)

Parameters

oldName string

The current name of the archive to rename.

newName string

The new name for the archive.

Returns

bool

true if the rename operation succeeded; otherwise, false.

RenameFolder(string?, string?)

Renames a subfolder within this folder.

bool RenameFolder(string? oldName, string? newName)

Parameters

oldName string

The current name of the folder to rename.

newName string

The new name for the folder.

Returns

bool

true if the rename operation succeeded; otherwise, false.