Table of Contents

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

int

FileSuffix

The conventional file-name suffix of a manifest.

public const string FileSuffix = ".s100collection.json"

Field Value

string

FormatName

The format value that identifies a manifest.

public const string FormatName = "encdotnet-s100-collection"

Field Value

string

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

path string

Returns

bool

Read(Stream)

Reads a manifest, validating it.

public static CollectionManifestDocument Read(Stream stream)

Parameters

stream Stream

Returns

CollectionManifestDocument

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

path string

Returns

CollectionManifestDocument

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

manifest CollectionManifestDocument
manifestDirectory string

Returns

IReadOnlyList<CollectionManifestGroupSummary>