Class CollectionManifest
- Namespace
- EncDotNet.S100.Collections.Manifests
- Assembly
- EncDotNet.S100.Collections.dll
Reads and recognises local collection manifests.
public static class CollectionManifest
- Inheritance
-
CollectionManifest
- Inherited Members
Fields
CurrentVersion
The format version this library reads.
public const int CurrentVersion = 1
Field Value
FileSuffix
The conventional file-name suffix of a manifest.
public const string FileSuffix = ".s100collection.json"
Field Value
FormatName
The format value that identifies a manifest.
public const string FormatName = "encdotnet-s100-collection"
Field Value
Methods
IsManifestPath(string)
Returns true when path is an existing manifest file:
its name ends with FileSuffix, or it is a .json
file whose top-level format is FormatName.
public static bool IsManifestPath(string path)
Parameters
pathstring
Returns
Read(Stream)
Reads a manifest, validating it.
public static CollectionManifestDocument Read(Stream stream)
Parameters
streamStream
Returns
Exceptions
- CollectionManifestException
The content is not a valid manifest; Problems says where.
- NotSupportedException
The manifest is from a newer, unknown format version.
ReadFile(string)
Reads the manifest file at path.
public static CollectionManifestDocument ReadFile(string path)
Parameters
pathstring
Returns
Exceptions
- CollectionManifestException
The file is not a valid manifest.
- NotSupportedException
The manifest is from a newer, unknown format version.
- IOException
The file cannot be read.
Summarize(CollectionManifestDocument, string)
Summarises each group of manifest: its paths, and
how many are missing under manifestDirectory. Only
checks that paths exist; nothing is scanned.
public static IReadOnlyList<CollectionManifestGroupSummary> Summarize(CollectionManifestDocument manifest, string manifestDirectory)
Parameters
manifestCollectionManifestDocumentmanifestDirectorystring