Interface IArchiveInfo
- Namespace
- Cobilas.GodotEngine.Utility.IO.Interfaces
- Assembly
- com.cobilas.godot.utility.dll
Represents information about an archive file and provides operations for working with archive contents.
public interface IArchiveInfo : IDataInfo, IDisposable, IFormattable
- Inherited Members
Remarks
This interface extends IDataInfo to provide archive-specific functionality including file extension information and stream-based access to archive contents.
Properties
ArchiveExtension
Gets the file extension of the archive.
string ArchiveExtension { get; }
Property Value
- string
The archive file extension including the dot (e.g., ".zip", ".rar").
NameWithoutExtension
Gets the name of the archive without the file extension.
string NameWithoutExtension { get; }
Property Value
- string
The archive name excluding the extension.
Methods
CopyTo(string?)
Copies the archive to the specified destination path without overwriting existing files.
bool CopyTo(string? destinationPath)
Parameters
destinationPathstringThe destination path where the archive will be copied.
Returns
- bool
trueif the copy operation succeeded; otherwise,false.
CopyTo(string?, bool)
Copies the archive to the specified destination path.
bool CopyTo(string? destinationPath, bool overwrite)
Parameters
destinationPathstringThe destination path where the archive will be copied.
overwriteboolWhether to overwrite an existing file at the destination path.
Returns
- bool
trueif the copy operation succeeded; otherwise,false.
Move(string?)
Moves the archive to the specified destination path.
bool Move(string? destinationPath)
Parameters
destinationPathstringThe destination path where the archive will be moved.
Returns
- bool
trueif the move operation succeeded; otherwise,false.
Open(FileAccess)
Opens the archive with the specified access mode using the default StreamType.
IStream Open(FileAccess access)
Parameters
accessFileAccessThe file access mode specifying read and/or write permissions.
Returns
- IStream
A stream object for reading from or writing to the archive.
Open(FileAccess, StreamType)
Opens the archive with the specified access mode and StreamType.
IStream Open(FileAccess access, StreamType type)
Parameters
accessFileAccessThe file access mode specifying read and/or write permissions.
typeStreamTypeThe type of stream to use for accessing the archive contents.
Returns
- IStream
A stream object for reading from or writing to the archive.