Show / Hide Table of Contents

Interface IForwardOnlyBuilder

Builds a file system directory without changing or removing elements that have already been added.

Namespace: ZeroInstall.Store.FileSystem
Assembly: ZeroInstall.Store.dll
Syntax
public interface IForwardOnlyBuilder

Methods

AddDirectory(String)

Adds a subdirectory to the implementation.

Declaration
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
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
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
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.

In This Article
Back to top Copyright Bastian Eicher et al