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
builderIBuilderThe builder.
metadataSingleFileThe metadata of the file.
streamStreamThe 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
builderIBuilderThe builder.
pathstringThe 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
builderIBuilderThe builder.
metadataCopyFromStepThe path of the source and destination file or directory.
pathstringThe path of the implementation referenced by
metadata.handlerITaskHandlerA 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
builderIBuilderThe builder.
metadataRemoveStepThe 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
builderIBuilderThe builder.
metadataRenameStepThe path of the source and destination file or directory.
Exceptions
- UnauthorizedAccessException
Access to a resource was denied.
- IOException
An IO operation failed.