Table of Contents

Class SgaArchive

Namespace
OpenCompote.SGA
Assembly
OpenCompote.dll

Represents the open SGA archive file itself.

public class SgaArchive : IDisposable
Inheritance
SgaArchive
Implements
Inherited Members

Properties

ArchiveName

Gets or sets the name of the SGA archive.

public string ArchiveName { get; set; }

Property Value

string

Exceptions

InvalidOperationException

Setter throws this exception when the archive was opened in read-only mode.

ObjectDisposedException

The archive was already closed.

Drives

Gets the list of SGA Drives currently in the archive.

public ReadOnlyCollection<SgaDrive> Drives { get; }

Property Value

ReadOnlyCollection<SgaDrive>

Exceptions

ObjectDisposedException

The archive was already closed.

Mode

Gets the Mode in which the archive was opened.

public SgaMode Mode { get; }

Property Value

SgaMode

Version

Gets the version of the SGA archive.

public SgaVersion Version { get; }

Property Value

SgaVersion

Methods

AddDrive(string, string)

Creates new SgaDrive in the archive with the specific alias and name. New drive also contains a new empty RootFolder with the same name as the drive.

public SgaDrive AddDrive(string alias, string name)

Parameters

alias string

Alias of the new drive.

name string

Name of the new drive.

Returns

SgaDrive

New SgaDrive object

Exceptions

InvalidOperationException

Archive was open in read-only mode.

ArgumentNullException

alias or name is null.

ObjectDisposedException

The archive was already closed.

Dispose()

Disposes the SGA archive, writing any pending changes if in create or write mode.

public void Dispose()

GetDrive(string)

Returns first SgaDrive with name or alias matching the parameter. If no matching drive is found returns null.

public SgaDrive? GetDrive(string driveName)

Parameters

driveName string

Name or Alias of the Drive.

Returns

SgaDrive

SgaDrive or null if no matching drive was found.

Exceptions

ArgumentNullException

The driveName is null.

ObjectDisposedException

The archive was already closed.