PersonalStorage.Create

Create(string, FileFormatVersion, CancellationToken)

Creates the new PST file with the specified file name.

public static PersonalStorage Create(string fileName, FileFormatVersion version, 
    CancellationToken token)
ParameterTypeDescription
fileNameStringThe full name of the file.
versionFileFormatVersionThe PST file version.
tokenCancellationTokenPropagates notification that operations should be canceled.

Return Value

A PersonalStorage object that represents the new PST.

Exceptions

exceptioncondition
NotImplementedExceptionthrows if ANSI file version is created
ArgumentNullExceptionthrows if file name is null or empty

Remarks

Note, only Unicode file version creation is supported now.

See Also


Create(Stream, FileFormatVersion, CancellationToken)

Creates the PST in a stream.

public static PersonalStorage Create(Stream stream, FileFormatVersion version, 
    CancellationToken token)
ParameterTypeDescription
streamStreamThe stream in which PST is created.
versionFileFormatVersionThe PST file version.
tokenCancellationTokenPropagates notification that operations should be canceled.

Return Value

A PersonalStorage object that represents the new PST.

Exceptions

exceptioncondition
NotImplementedExceptionthrows if ANSI file version is created
ArgumentNullExceptionthrows if file name is null or empty

Remarks

Note, only Unicode file version creation is supported now.

See Also


Create(Stream, FileFormatVersion, bool, CancellationToken)

Creates the PST in a stream.

public static PersonalStorage Create(Stream stream, FileFormatVersion version, 
    bool leaveStreamOpen, CancellationToken token)
ParameterTypeDescription
streamStreamThe stream in which PST is created.
versionFileFormatVersionThe PST file version.
leaveStreamOpenBooleanLeave stream open when PersonalStorage is disposed.
tokenCancellationTokenPropagates notification that operations should be canceled.

Return Value

A PersonalStorage object that represents the new PST.

Exceptions

exceptioncondition
NotImplementedExceptionthrows if ANSI file version is created
ArgumentNullExceptionthrows if file name is null or empty

Remarks

Note, only Unicode file version creation is supported now.

See Also


Create(string, FileFormatVersion)

Creates the new PST file with the specified file name.

public static PersonalStorage Create(string fileName, FileFormatVersion version)
ParameterTypeDescription
fileNameStringThe full name of the file.
versionFileFormatVersionThe PST file version.

Return Value

A PersonalStorage object that represents the new PST.

Exceptions

exceptioncondition
NotImplementedExceptionthrows if ANSI file version is created
ArgumentNullExceptionthrows if file name is null or empty

Remarks

Note, only Unicode file version creation is supported now.

See Also


Create(Stream, FileFormatVersion)

Creates the PST in a stream.

public static PersonalStorage Create(Stream stream, FileFormatVersion version)
ParameterTypeDescription
streamStreamThe stream in which PST is created.
versionFileFormatVersionThe PST file version.

Return Value

A PersonalStorage object that represents the new PST.

Exceptions

exceptioncondition
NotImplementedExceptionthrows if ANSI file version is created
ArgumentNullExceptionthrows if stream is null

Remarks

Note, only Unicode file version creation is supported now.

See Also


Create(Stream, FileFormatVersion, bool)

Creates the PST in a stream.

public static PersonalStorage Create(Stream stream, FileFormatVersion version, bool leaveStreamOpen)
ParameterTypeDescription
streamStreamThe stream in which PST is created.
versionFileFormatVersionThe PST file version.
leaveStreamOpenBooleanLeave stream open when PersonalStorage is disposed.

Return Value

A PersonalStorage object that represents the new PST.

Exceptions

exceptioncondition
NotImplementedExceptionthrows if ANSI file version is created
ArgumentNullExceptionthrows if stream is null

Remarks

Note, only Unicode file version creation is supported now.

See Also