Class BuilderExtensions
Helpers for adding RetrievalMethods to IBuilders.
Namespace: ZeroInstall.Store.FileSystem
Assembly: ZeroInstall.Store.dll
Syntax
public static class BuilderExtensions : Object
Methods
AddFile(IBuilder, SingleFile, Stream)
Adds a file to the implementation.
Declaration
public static void AddFile(this IBuilder builder, SingleFile metadata, Stream stream)
Parameters
Type | Name | Description |
---|---|---|
IBuilder | builder | The builder. |
SingleFile | metadata | The metadata of the file. |
Stream | stream | The contents of the file. |
Exceptions
Type | Condition |
---|---|
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.
Declaration
public static IBuilder BuildDirectory(this IBuilder builder, string path)
Parameters
Type | Name | Description |
---|---|---|
IBuilder | builder | The builder. |
String | path | The path of the directory to create relative to the implementation root. |
Returns
Type | Description |
---|---|
IBuilder | An IBuilder wrapped around |
Exceptions
Type | Condition |
---|---|
UnauthorizedAccessException | Access to a resource was denied. |
IOException | An IO operation failed. |
CopyFrom(IBuilder, CopyFromStep, String, ITaskHandler)
Copies files or directories from another implementation.
Declaration
public static void CopyFrom(this IBuilder builder, CopyFromStep metadata, string path, ITaskHandler handler)
Parameters
Type | Name | Description |
---|---|---|
IBuilder | builder | The builder. |
CopyFromStep | metadata | The path of the source and destination file or directory. |
String | path | The path of the implementation referenced by |
ITaskHandler | handler | A callback object used when the the user needs to be informed about IO tasks. |
Exceptions
Type | Condition |
---|---|
UnauthorizedAccessException | Access to a resource was denied. |
IOException | An IO operation failed. |
Remove(IBuilder, RemoveStep)
Removes a file or directory from the implementation.
Declaration
public static void Remove(this IBuilder builder, RemoveStep metadata)
Parameters
Type | Name | Description |
---|---|---|
IBuilder | builder | The builder. |
RemoveStep | metadata | The path of the file or directory. |
Exceptions
Type | Condition |
---|---|
UnauthorizedAccessException | Access to a resource was denied. |
IOException | An IO operation failed. |
Rename(IBuilder, RenameStep)
Renames a file or directory in the implementation.
Declaration
public static void Rename(this IBuilder builder, RenameStep metadata)
Parameters
Type | Name | Description |
---|---|---|
IBuilder | builder | The builder. |
RenameStep | metadata | The path of the source and destination file or directory. |
Exceptions
Type | Condition |
---|---|
UnauthorizedAccessException | Access to a resource was denied. |
IOException | An IO operation failed. |