ArchiveReader class final
Reads .tar.gz archives and extracts selected entries.
Provides streaming extraction with entry selection, path safety validation, and SHA-256 hash computation. Only the selected entry is extracted to disk — the rest of the archive is skipped.
Constructors
- ArchiveReader()
-
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
extractMatchingEntry(
{required File archiveFile, required Directory outputDir, required ArchiveSelectionContext selection}) → File? -
Extracts the entry matching
canonicalNamefrom a.tar.gzarchive. -
listEntries(
File archiveFile) → List< ArchiveEntry> -
Lists all entries in a
.tar.gzarchive without extracting. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
sha256Hash(
File file) → Future< String> - Computes the SHA-256 hash of a file's contents.