Class ImplementationStoreUtils
Helper methods for IImplementationStores and paths.
Namespace: ZeroInstall.Store.Implementations
Assembly: ZeroInstall.Store.dll
Syntax
public static class ImplementationStoreUtils : Object
Methods
GetPath(IImplementationStore, ImplementationBase)
Determines the local path of an implementation.
Declaration
public static string GetPath(this IImplementationStore store, ImplementationBase implementation)
Parameters
Type | Name | Description |
---|---|---|
IImplementationStore | store | The store containing the implementation. |
ImplementationBase | implementation | The implementation to be located. |
Returns
Type | Description |
---|---|
String | A fully qualified path to the directory containing the implementation. |
Exceptions
Type | Condition |
---|---|
ImplementationNotFoundException | The |
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.
Declaration
public static bool IsImplementation(string path, out string implementationPath)
Parameters
Type | Name | Description |
---|---|---|
String | path | A path to a directory that may or may not be inside a store implementation. |
String | implementationPath | The top-level of the detected store implementation directory if any; |
Returns
Type | Description |
---|---|
Boolean |
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.
Declaration
public static void Verify(string path, ManifestDigest manifestDigest, ITaskHandler handler)
Parameters
Type | Name | Description |
---|---|---|
String | path | The path of the directory ot check. |
ManifestDigest | manifestDigest | The expected digest. |
ITaskHandler | handler | A callback object used when the the user is to be informed about progress. |
Exceptions
Type | Condition |
---|---|
OperationCanceledException | The user canceled the task. |
NotSupportedException |
|
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 |