ArchiveSync
Downloads a .7z archive + .sha256 sidecar from an IFileProvider, verifies the hash, extracts the archive via SevenZipCommand, and writes a .netsetup.sha256 marker so subsequent calls are no-ops when the remote hash is unchanged.
public static class ArchiveSync
1. Fields
1.1. MarkerFileName
Marker file written inside the extracted folder. Contains the SHA-256 of the archive that produced the contents. Second run with the same remote hash skips all work.
public const string MarkerFileName
2. Methods
2.1. EnsureExtracted(IFileProvider, ISystemHost, string, AbsolutePath, string)
Ensures targetRoot/extractIntoSubPath/{archiveName} matches the remote .7z at archiveSubPath. On hash mismatch or missing marker: deletes stale local state, downloads + verifies + extracts, writes marker. On sidecar hash mismatch: calls host.ExitFailure.
public static void EnsureExtracted(IFileProvider source, ISystemHost host, string archiveSubPath, AbsolutePath targetRoot, string extractIntoSubPath)
| Name | Type | Description |
|---|---|---|
source |
IFileProvider |
|
host |
ISystemHost |
|
archiveSubPath |
string |
|
targetRoot |
AbsolutePath |
|
extractIntoSubPath |
string |