Table of Contents

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 IBuilder

The builder.

metadata SingleFile

The metadata of the file.

stream Stream

The 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 IBuilder

The builder.

path string

The path of the directory to create relative to the implementation root.

Returns

IBuilder

An IBuilder wrapped around builder that prepends path to paths.

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 IBuilder

The builder.

metadata CopyFromStep

The path of the source and destination file or directory.

path string

The path of the implementation referenced by metadata.

handler ITaskHandler

A 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 IBuilder

The builder.

metadata RemoveStep

The 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 IBuilder

The builder.

metadata RenameStep

The path of the source and destination file or directory.

Exceptions

UnauthorizedAccessException

Access to a resource was denied.

IOException

An IO operation failed.