Class S100FeedPackager
- Namespace
- EncDotNet.S100.Collections.Feeds
- Assembly
- EncDotNet.S100.Collections.dll
Writes a published item's download (issue #680): a zip holding its exchange-set catalogue, base file and updates at their paths relative to the item's root, whether that root is a folder or a ZIP archive.
public static class S100FeedPackager
- Inheritance
-
S100FeedPackager
- Inherited Members
Methods
EstimateSize(LocalItemLocation)
The total (uncompressed) size of the item's files, or null when unknown.
public static long? EstimateSize(LocalItemLocation location)
Parameters
locationLocalItemLocation
Returns
- long?
Exists(LocalItemLocation)
True when the item's base file is present, so it can be published.
public static bool Exists(LocalItemLocation location)
Parameters
locationLocalItemLocation
Returns
Files(LocalItemLocation)
The files of location, relative to its root: catalogue first, then base, then updates.
public static IReadOnlyList<string> Files(LocalItemLocation location)
Parameters
locationLocalItemLocation
Returns
LastModified(LocalItemLocation)
When the item's files last changed (the latest of them), or null when unknown.
public static DateTimeOffset? LastModified(LocalItemLocation location)
Parameters
locationLocalItemLocation
Returns
Stamp(LocalItemLocation)
A token that changes whenever the item's download would change: its files' paths, sizes and modification times. Exporters compare it to skip rewriting unchanged downloads.
public static string Stamp(LocalItemLocation location)
Parameters
locationLocalItemLocation
Returns
WriteZipAsync(Stream, LocalItemLocation, CancellationToken)
Writes the zip for location to output (which need not seek).
public static Task WriteZipAsync(Stream output, LocalItemLocation location, CancellationToken cancellationToken = default)
Parameters
outputStreamlocationLocalItemLocationcancellationTokenCancellationToken
Returns
Exceptions
- FileNotFoundException
The base file is gone.