Struct ArchiveEntryInfo
Contains read-only metadata about a single entry (file or directory) within a compressed archive.
Inherited Members
Namespace: Scylla.Core.Util.Compression
Assembly: ScyllaCore.dll
Syntax
public readonly struct ArchiveEntryInfo
Remarks
Instances of this struct are returned by ListEntries(string) when enumerating the contents of an archive. They carry descriptive information about each entry but do not provide access to the entry's data; use ExtractEntry(string, string) or ExtractEntryAsync(string, string, CancellationToken) to retrieve the raw bytes.
Directory entries have both UncompressedSize and CompressedSize
set to zero, and their CompressionRatio returns -1. Whether empty
directories are included in an archive is controlled by
IncludeEmptyDirectories.
The LastModified timestamp is preserved or discarded during archiving depending on PreserveTimestamps.
Constructors
ArchiveEntryInfo(string, string, long, long, bool, DateTime, bool)
Initializes a new ArchiveEntryInfo struct with all metadata for a single archive entry.
Declaration
public ArchiveEntryInfo(string name, string fullPath, long uncompressedSize, long compressedSize, bool isDirectory, DateTime lastModified, bool isEncrypted)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | The leaf file or directory name, without path separators (e.g., |
| string | fullPath | The full path of the entry within the archive, relative to the archive root
(e.g., |
| long | uncompressedSize | The original, uncompressed size of the entry in bytes. Pass |
| long | compressedSize | The compressed size of the entry as stored in the archive, in bytes. Pass |
| bool | isDirectory |
|
| DateTime | lastModified | The date and time the entry was last modified before archiving. |
| bool | isEncrypted |
|
Properties
CompressedSize
Gets the compressed size of the entry's data as stored in the archive, in bytes.
Declaration
public long CompressedSize { get; }
Property Value
| Type | Description |
|---|---|
| long | The size the entry occupies inside the compressed archive. Returns |
CompressionRatio
Gets the compression efficiency of this entry as a percentage of the original size.
Declaration
public double CompressionRatio { get; }
Property Value
| Type | Description |
|---|---|
| double | A value in the range |
FullPath
Gets the full path of this entry as stored within the archive, including all intermediate directory segments relative to the archive root.
Declaration
public string FullPath { get; }
Property Value
| Type | Description |
|---|---|
| string | A forward-slash-delimited path string, e.g. |
IsDirectory
Gets a value indicating whether this entry represents a directory rather than a file.
Declaration
public bool IsDirectory { get; }
Property Value
| Type | Description |
|---|---|
| bool |
|
IsEncrypted
Gets a value indicating whether this entry's data is encrypted within the archive.
Declaration
public bool IsEncrypted { get; }
Property Value
| Type | Description |
|---|---|
| bool |
|
LastModified
Gets the last modification timestamp of the entry as recorded in the archive.
Declaration
public DateTime LastModified { get; }
Property Value
| Type | Description |
|---|---|
| DateTime | The date and time the file was last modified before it was added to the archive.
This value is only meaningful when the archive was created with
PreserveTimestamps set to |
Name
Gets the file or directory name of this entry, without any containing path segments.
Declaration
public string Name { get; }
Property Value
| Type | Description |
|---|---|
| string | The leaf name component of the entry path. For example, if FullPath
is |
UncompressedSize
Gets the uncompressed (original) size of the entry's data in bytes.
Declaration
public long UncompressedSize { get; }
Property Value
| Type | Description |
|---|---|
| long | The size the entry data occupies when fully decompressed. Returns |
Methods
ToString()
Returns a human-readable string representation of this archive entry.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string | For directory entries, a string in the format |