AppleArchive.CreateEntry

CreateEntry(string, string, bool)

Creates a single entry within the archive.

public AppleArchiveEntry CreateEntry(string name, string path, bool openImmediately = false)
ParameterTypeDescription
nameStringThe name of the entry.
pathStringThe path to the file to compress.
openImmediatelyBooleanTrue, if open the file immediately, otherwise open the file on archive saving.

Return Value

Apple Archive entry instance.

Exceptions

exceptioncondition
ObjectDisposedExceptionThe archive has been disposed.
ArgumentExceptionname is empty.
ArgumentNullExceptionpath is null.

See Also


CreateEntry(string, Stream)

Creates a single entry within the archive.

public AppleArchiveEntry CreateEntry(string name, Stream source)
ParameterTypeDescription
nameStringThe name of the entry.
sourceStreamThe input stream for the entry.

Return Value

Apple Archive entry instance.

Exceptions

exceptioncondition
ObjectDisposedExceptionThe archive has been disposed.
ArgumentExceptionname is empty.
ArgumentNullExceptionsource is null.

See Also


CreateEntry(string, FileInfo, bool)

Creates a single entry within the archive.

public AppleArchiveEntry CreateEntry(string name, FileInfo fileInfo, bool openImmediately = false)
ParameterTypeDescription
nameStringThe name of the entry.
fileInfoFileInfoThe metadata of file to be compressed.
openImmediatelyBooleanTrue, if open the file immediately, otherwise open the file on archive saving.

Return Value

Apple Archive entry instance.

Exceptions

exceptioncondition
ObjectDisposedExceptionThe archive has been disposed.
ArgumentExceptionname is empty.
ArgumentNullExceptionfileInfo is null.

See Also