Table of Contents

Class DirectoryOperation

Namespace
ZeroInstall.Store.Deployment
Assembly
ZeroInstall.Store.dll

Common base class for deployment operations that operate on directories with Manifests.

[MustDisposeResource]
public abstract class DirectoryOperation : StagedOperation, IDisposable
Inheritance
DirectoryOperation
Implements
Derived
Inherited Members

Constructors

DirectoryOperation(string, Manifest, ITaskHandler)

Common base class for deployment operations that operate on directories with Manifests.

protected DirectoryOperation(string path, Manifest manifest, ITaskHandler handler)

Parameters

path string

The path of the directory to operate on.

manifest Manifest

The contents of a <see cref="Manifests.Manifest"/> file describing the directory.

handler ITaskHandler

A callback object used when the user needs to be asked questions or informed about IO tasks.

Fields

Handler

A callback object used when the user needs to be asked questions or informed about IO tasks.

protected readonly ITaskHandler Handler

Field Value

ITaskHandler

Manifest

The contents of a Manifest file describing the directory.

protected readonly Manifest Manifest

Field Value

Manifest

Path

The path of the directory to operate on.

protected readonly string Path

Field Value

string

Properties

NoRestart

Indicates that applications shut down by the WindowsRestartManager shall not be restarted on Dispose().

public bool NoRestart { get; set; }

Property Value

bool

Methods

Dispose()

Performs a rollback of all changes made by Stage() if Commit() has not been called and completed yet.

public override void Dispose()

Randomize(string)

Appends a random string to a file path.

protected static string Randomize(string path)

Parameters

path string

Returns

string

UnlockFiles(IEnumerable<string>)

Uses WindowsRestartManager to close any applications that have open references to the specified files if possible and removes read-only attributes.

protected void UnlockFiles(IEnumerable<string> files)

Parameters

files IEnumerable<string>

Remarks

Closed applications will be restarted by Dispose().