Table of Contents

Class ImplementationStoreUtils

Namespace
ZeroInstall.Store.Implementations
Assembly
ZeroInstall.Store.dll

Helper methods for IImplementationStores and paths.

public static class ImplementationStoreUtils
Inheritance
ImplementationStoreUtils
Inherited Members

Methods

GetPath(IImplementationStore, ImplementationBase)

Determines the local path of an implementation.

public static string GetPath(this IImplementationStore store, ImplementationBase implementation)

Parameters

store IImplementationStore

The store containing the implementation.

implementation ImplementationBase

The implementation to be located.

Returns

string

A fully qualified path to the directory containing the implementation.

Exceptions

ImplementationNotFoundException

The implementation is not cached yet.

UnauthorizedAccessException

Read access to the store is not permitted.

IsImplementation(string, out string?)

Determines whether a path looks like it is inside a store implementation known by ManifestFormat.

public static bool IsImplementation(string path, out string? implementationPath)

Parameters

path string

A path to a directory that may or may not be inside a store implementation.

implementationPath string

The top-level of the detected store implementation directory if any; null otherwise.

Returns

bool

Remarks

Performs no file system access. Only looks at the path string itself.

Verify(string, ManifestDigest, ITaskHandler)

Checks whether an implementation directory matches the expected digest. Throws DigestMismatchException if it does not match.

public static void Verify(string path, ManifestDigest manifestDigest, ITaskHandler handler)

Parameters

path string

The path of the directory ot check.

manifestDigest ManifestDigest

The expected digest.

handler ITaskHandler

A callback object used when the the user is to be informed about progress.

Exceptions

OperationCanceledException

The user canceled the task.

NotSupportedException

manifestDigest does not list any supported digests.

IOException

The directory could not be processed.

UnauthorizedAccessException

Read access to the directory is not permitted.

DigestMismatchException

The directory does not match the expected digest