PersonalStorage.SplitIntoAsync

SplitIntoAsync(long, string, CancellationToken)

Asynchronously splits the PST into files of about the specified size.

public Task SplitIntoAsync(long chunkSize, string path, CancellationToken token = default)
ParameterTypeDescription
chunkSizeInt64The approximate size of each PST file, in bytes. It must be greater than 271,360 bytes.
pathStringThe folder to create the PST files in.
tokenCancellationTokenA token to cancel the operation.

Exceptions

exceptioncondition
ArgumentExceptionpath is null or empty.
ArgumentExceptionchunkSize is not greater than 271,360 bytes, the minimum size of a PST file.
InvalidOperationExceptionThe library runs in evaluation mode and chunkSize is greater than 100,000,000 bytes.

See Also


SplitIntoAsync(long, string, string, CancellationToken)

Asynchronously splits the PST into files of about the specified size, named with a prefix.

public Task SplitIntoAsync(long chunkSize, string partFileNamePrefix, string path, 
    CancellationToken token = default)
ParameterTypeDescription
chunkSizeInt64The approximate size of each PST file, in bytes. It must be greater than 271,360 bytes.
partFileNamePrefixStringThe prefix of the file names. If it is null or empty, the files are named without a prefix.
pathStringThe folder to create the PST files in.
tokenCancellationTokenA token to cancel the operation.

Exceptions

exceptioncondition
ArgumentExceptionpath is null or empty.
ArgumentExceptionchunkSize is not greater than 271,360 bytes, the minimum size of a PST file.
InvalidOperationExceptionThe library runs in evaluation mode and chunkSize is greater than 100,000,000 bytes.

Remarks

The files are named after the template {prefix}_part{number}.pst; without a prefix, the {prefix} part is left out. StorageProcessed is raised after each file is created.

See Also


SplitIntoAsync(IList<MailQuery>, string, CancellationToken)

Asynchronously splits the PST into several files by search criteria.

public Task SplitIntoAsync(IList<MailQuery> criteria, string path, 
    CancellationToken token = default)
ParameterTypeDescription
criteriaIList`1The search criteria. A separate PST is created for the messages that match each MailQuery.
pathStringThe folder to create the PST files in.
tokenCancellationTokenA token to cancel the operation.

Exceptions

exceptioncondition
ArgumentExceptionpath is null or empty.

See Also


SplitIntoAsync(IList<MailQuery>, string, string, CancellationToken)

Asynchronously splits the PST into several files by search criteria, named with a prefix.

public Task SplitIntoAsync(IList<MailQuery> criteria, string partFileNamePrefix, string path, 
    CancellationToken token = default)
ParameterTypeDescription
criteriaIList`1The search criteria. A separate PST is created for the messages that match each MailQuery.
partFileNamePrefixStringThe prefix of the file names. If it is null or empty, the files are named without a prefix.
pathStringThe folder to create the PST files in.
tokenCancellationTokenA token to cancel the operation.

Exceptions

exceptioncondition
ArgumentExceptionpath is null or empty.

Remarks

The files are named after the template {prefix}_part{number}.pst; without a prefix, the {prefix} part is left out. StorageProcessed is raised after each file is created.

See Also