Show / Hide Table of Contents

Class ManifestBuilder

Builds a Manifest for a file system directory.

Inheritance
Object
ManifestBuilder
Implements
IBuilder
IForwardOnlyBuilder
Namespace: ZeroInstall.Store.Manifests
Assembly: ZeroInstall.Store.dll
Syntax
public class ManifestBuilder : MarshalNoTimeout, IBuilder, IForwardOnlyBuilder

Constructors

ManifestBuilder(ManifestFormat)

Creates a new manifest builder.

Declaration
public ManifestBuilder(ManifestFormat format)
Parameters
Type Name Description
ManifestFormat format

The manifest format.

Properties

Manifest

The manifest.

Declaration
public Manifest Manifest { get; }
Property Value
Type Description
Manifest

Methods

AddDirectory(String)

Adds a subdirectory to the implementation.

Declaration
public void AddDirectory(string path)
Parameters
Type Name Description
String path

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

Exceptions
Type Condition
UnauthorizedAccessException

Access to a resource was denied.

IOException

An IO operation failed.

AddFile(String, Stream, UnixTime, Boolean)

Adds a file to the implementation.

Declaration
public void AddFile(string path, Stream stream, UnixTime modifiedTime, bool executable = false)
Parameters
Type Name Description
String path

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

Stream stream

The contents of the file.

UnixTime modifiedTime

The last write time to set for the file.

Boolean executable

true if the file's executable bit is to be set; false otherwise.

Exceptions
Type Condition
UnauthorizedAccessException

Access to a resource was denied.

IOException

An IO operation failed.

AddHardlink(String, String, Boolean)

Adds a hardlink to the implementation.

Declaration
public void AddHardlink(string path, string target, bool executable = false)
Parameters
Type Name Description
String path

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

String target

The path of the existing file the hardlink shall be based on relative to the implementation root. Must point

Boolean executable

true if the executable bit of the hardlink is set; false otherwise.

Exceptions
Type Condition
UnauthorizedAccessException

Access to a resource was denied.

IOException

An IO operation failed.

NotSupportedException

The currently platform or builder does not support hardlinks. Use AddFile(String, Stream, UnixTime, Boolean) instead.

AddSymlink(String, String)

Adds a symbolic link to the implementation.

Declaration
public void AddSymlink(string path, string target)
Parameters
Type Name Description
String path

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

String target

The target the symbolic link shall point to relative to path. May use non-native path separators.

Exceptions
Type Condition
UnauthorizedAccessException

Access to a resource was denied.

IOException

An IO operation failed.

MarkAsExecutable(String)

Marks a previously added file as executable.

Declaration
public void MarkAsExecutable(string path)
Parameters
Type Name Description
String path

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

Exceptions
Type Condition
UnauthorizedAccessException

Access to a resource was denied.

IOException

An IO operation failed.

Remove(String)

Removes a file or directory from the implementation.

Declaration
public void Remove(string path)
Parameters
Type Name Description
String path

The path of the file or directory relative to the implementation root.

Exceptions
Type Condition
UnauthorizedAccessException

Access to a resource was denied.

IOException

An IO operation failed.

Rename(String, String)

Renames a file or directory in the implementation.

Declaration
public void Rename(string path, string target)
Parameters
Type Name Description
String path

The original path of the file or directory relative to the implementation root.

String target

The new path of the file or directory relative to the implementation root.

Exceptions
Type Condition
UnauthorizedAccessException

Access to a resource was denied.

IOException

An IO operation failed.

TurnIntoSymlink(String)

Turns a previously added file into a symlink.

Declaration
public void TurnIntoSymlink(string path)
Parameters
Type Name Description
String path

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

Exceptions
Type Condition
UnauthorizedAccessException

Access to a resource was denied.

IOException

An IO operation failed.

Implements

IBuilder
IForwardOnlyBuilder
In This Article
Back to top Copyright Bastian Eicher et al