Class BuilderExtensions
- Namespace
- ZeroInstall.Store.FileSystem
- Assembly
- ZeroInstall.Store.dll
Helpers for adding RetrievalMethods to IBuilders.
public static class BuilderExtensions
- Inheritance
-
BuilderExtensions
- Inherited Members
Methods
AddFile(IBuilder, SingleFile, Stream)
Adds a file to the implementation.
public static void AddFile(this IBuilder builder, SingleFile metadata, Stream stream)
Parameters
builder
IBuilderThe builder.
metadata
SingleFileThe metadata of the file.
stream
StreamThe contents of the file.
Exceptions
- UnauthorizedAccessException
Access to a resource was denied.
- IOException
An IO operation failed.
BuildDirectory(IBuilder, string?)
Adds a subdirectory to the implementation and returns a wrapped IBuilder to elements inside this subdirectory.
public static IBuilder BuildDirectory(this IBuilder builder, string? path)
Parameters
builder
IBuilderThe builder.
path
stringThe path of the directory to create relative to the implementation root.
Returns
Exceptions
- UnauthorizedAccessException
Access to a resource was denied.
- IOException
An IO operation failed.
CopyFrom(IBuilder, CopyFromStep, string, ITaskHandler)
Copies files or directories from another implementation.
public static void CopyFrom(this IBuilder builder, CopyFromStep metadata, string path, ITaskHandler handler)
Parameters
builder
IBuilderThe builder.
metadata
CopyFromStepThe path of the source and destination file or directory.
path
stringThe path of the implementation referenced by
metadata
.handler
ITaskHandlerA callback object used when the user needs to be informed about IO tasks.
Exceptions
- UnauthorizedAccessException
Access to a resource was denied.
- IOException
An IO operation failed.
Remove(IBuilder, RemoveStep)
Removes a file or directory from the implementation.
public static void Remove(this IBuilder builder, RemoveStep metadata)
Parameters
builder
IBuilderThe builder.
metadata
RemoveStepThe path of the file or directory.
Exceptions
- UnauthorizedAccessException
Access to a resource was denied.
- IOException
An IO operation failed.
Rename(IBuilder, RenameStep)
Renames a file or directory in the implementation.
public static void Rename(this IBuilder builder, RenameStep metadata)
Parameters
builder
IBuilderThe builder.
metadata
RenameStepThe path of the source and destination file or directory.
Exceptions
- UnauthorizedAccessException
Access to a resource was denied.
- IOException
An IO operation failed.