Zero Install .NET API  2.18.1
ZeroInstall.Store.Implementations.ImplementationStoreUtils Class Reference

Helper methods for IImplementationStores and paths. More...

Static Public Member Functions

static ? string DetectImplementationPath (string path)
 Determines whether a path looks like it is inside a store implementation known by ManifestFormat. More...
 
static IEnumerable< ManifestDigestListAllSafe (this IImplementationStore implementationStore)
 Wrapper for IImplementationStore.ListAll, handling exceptions. More...
 
static IEnumerable< string > ListAllTempSafe (this IImplementationStore implementationStore)
 Wrapper for IImplementationStore.ListAllTemp, handling exceptions. More...
 
static ? string GetPathSafe (this IImplementationStore implementationStore, ManifestDigest manifestDigest)
 Wrapper for IImplementationStore.GetPath, handling exceptions. More...
 
static string GetPath (this IImplementationStore implementationStore, ImplementationBase implementation)
 Determines the local path of an implementation. More...
 
static void Purge (this IImplementationStore implementationStore, ITaskHandler handler)
 Removes all implementations from a store. More...
 

Detailed Description

Helper methods for IImplementationStores and paths.

Member Function Documentation

◆ DetectImplementationPath()

static ? string ZeroInstall.Store.Implementations.ImplementationStoreUtils.DetectImplementationPath ( string  path)
inlinestatic

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

Parameters
pathA path to a directory that may or may not be inside a store implementation.
Returns
The top-level of the detected store implementation directory if any; null otherwise.

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

◆ GetPath()

static string ZeroInstall.Store.Implementations.ImplementationStoreUtils.GetPath ( this IImplementationStore  implementationStore,
ImplementationBase  implementation 
)
inlinestatic

Determines the local path of an implementation.

Parameters
implementationStoreThe store to get the implementation from.
implementationThe implementation to be located.
Returns
A fully qualified path to the directory containing the implementation.
Exceptions
ImplementationNotFoundExceptionThe implementation is not cached yet.
UnauthorizedAccessExceptionRead access to the store is not permitted.

◆ GetPathSafe()

static ? string ZeroInstall.Store.Implementations.ImplementationStoreUtils.GetPathSafe ( this IImplementationStore  implementationStore,
ManifestDigest  manifestDigest 
)
inlinestatic

Wrapper for IImplementationStore.GetPath, handling exceptions.

◆ ListAllSafe()

static IEnumerable<ManifestDigest> ZeroInstall.Store.Implementations.ImplementationStoreUtils.ListAllSafe ( this IImplementationStore  implementationStore)
inlinestatic

Wrapper for IImplementationStore.ListAll, handling exceptions.

◆ ListAllTempSafe()

static IEnumerable<string> ZeroInstall.Store.Implementations.ImplementationStoreUtils.ListAllTempSafe ( this IImplementationStore  implementationStore)
inlinestatic

Wrapper for IImplementationStore.ListAllTemp, handling exceptions.

◆ Purge()

static void ZeroInstall.Store.Implementations.ImplementationStoreUtils.Purge ( this IImplementationStore  implementationStore,
ITaskHandler  handler 
)
inlinestatic

Removes all implementations from a store.

Parameters
implementationStoreThe store to be purged.
handlerA callback object used when the the user is to be informed about progress.
Exceptions
OperationCanceledExceptionThe user canceled the task.
IOExceptionAn implementation could not be deleted.
UnauthorizedAccessExceptionWrite access to the store is not permitted.

The documentation for this class was generated from the following file: