Zero Install .NET API 2.20.0
ZeroInstall.Store.FileSystem.BuilderExtensions Class Reference

Helpers for adding RetrievalMethods to IBuilders. More...

Static Public Member Functions

static IBuilder BuildDirectory (this IBuilder builder, string? path)
 Adds a subdirectory to the implementation and returns a wrapped IBuilder to elements inside this subdirectory. More...
 
static void AddFile (this IBuilder builder, SingleFile metadata, Stream stream)
 Adds a file to the implementation. More...
 
static void Remove (this IBuilder builder, RemoveStep metadata)
 Removes a file or directory from the implementation. More...
 
static void Rename (this IBuilder builder, RenameStep metadata)
 Renames a file or directory in the implementation. More...
 
static void CopyFrom (this IBuilder builder, CopyFromStep metadata, string path, ITaskHandler handler)
 Copies files or directories from another implementation. More...
 

Detailed Description

Helpers for adding RetrievalMethods to IBuilders.

Member Function Documentation

◆ AddFile()

static void ZeroInstall.Store.FileSystem.BuilderExtensions.AddFile ( this IBuilder  builder,
SingleFile  metadata,
Stream  stream 
)
static

Adds a file to the implementation.

Parameters
builderThe builder.
metadataThe metadata of the file.
streamThe contents of the file.
Exceptions
UnauthorizedAccessExceptionAccess to a resource was denied.
IOExceptionAn IO operation failed.

◆ BuildDirectory()

static IBuilder ZeroInstall.Store.FileSystem.BuilderExtensions.BuildDirectory ( this IBuilder  builder,
string?  path 
)
inlinestatic

Adds a subdirectory to the implementation and returns a wrapped IBuilder to elements inside this subdirectory.

Parameters
builderThe builder.
pathThe path of the directory to create relative to the implementation root.
Exceptions
UnauthorizedAccessExceptionAccess to a resource was denied.
IOExceptionAn IO operation failed.
Returns
An IBuilder wrapped around builder that prepends path to paths.

◆ CopyFrom()

static void ZeroInstall.Store.FileSystem.BuilderExtensions.CopyFrom ( this IBuilder  builder,
CopyFromStep  metadata,
string  path,
ITaskHandler  handler 
)
static

Copies files or directories from another implementation.

Parameters
builderThe builder.
metadataThe path of the source and destination file or directory.
pathThe path of the implementation referenced by metadata .
handlerA callback object used when the the user needs to be informed about IO tasks.
Exceptions
UnauthorizedAccessExceptionAccess to a resource was denied.
IOExceptionAn IO operation failed.

◆ Remove()

static void ZeroInstall.Store.FileSystem.BuilderExtensions.Remove ( this IBuilder  builder,
RemoveStep  metadata 
)
static

Removes a file or directory from the implementation.

Parameters
builderThe builder.
metadataThe path of the file or directory.
Exceptions
UnauthorizedAccessExceptionAccess to a resource was denied.
IOExceptionAn IO operation failed.

◆ Rename()

static void ZeroInstall.Store.FileSystem.BuilderExtensions.Rename ( this IBuilder  builder,
RenameStep  metadata 
)
static

Renames a file or directory in the implementation.

Parameters
builderThe builder.
metadataThe path of the source and destination file or directory.
Exceptions
UnauthorizedAccessExceptionAccess to a resource was denied.
IOExceptionAn IO operation failed.

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