PersonalStorage.CreateAsync
Contents
[
Hide
]CreateAsync(string, FileFormatVersion, CancellationToken)
Creates the new PST file with the specified file name.
public static Task<PersonalStorage> CreateAsync(string fileName, FileFormatVersion version,
CancellationToken token = default)
Parameter | Type | Description |
---|---|---|
fileName | String | The full name of the file. |
version | FileFormatVersion | The PST file version. |
token | CancellationToken | Propagates notification that operations should be canceled. |
Return Value
A PersonalStorage object that represents the new PST.
Exceptions
exception | condition |
---|---|
NotImplementedException | throws if ANSI file version is created |
ArgumentNullException | throws if file name is null or empty |
Remarks
Note, only Unicode file version creation is supported now.
See Also
- enum FileFormatVersion
- class PersonalStorage
- namespace Aspose.Email.Storage.Pst
- assembly Aspose.Email
CreateAsync(Stream, FileFormatVersion, CancellationToken)
Creates the PST in a stream.
public static Task<PersonalStorage> CreateAsync(Stream stream, FileFormatVersion version,
CancellationToken token = default)
Parameter | Type | Description |
---|---|---|
stream | Stream | The stream in which PST is created. |
version | FileFormatVersion | The PST file version. |
token | CancellationToken | Propagates notification that operations should be canceled. |
Return Value
A PersonalStorage object that represents the new PST.
Exceptions
exception | condition |
---|---|
NotImplementedException | throws if ANSI file version is created |
ArgumentNullException | throws if file name is null or empty |
Remarks
Note, only Unicode file version creation is supported now.
See Also
- enum FileFormatVersion
- class PersonalStorage
- namespace Aspose.Email.Storage.Pst
- assembly Aspose.Email
CreateAsync(Stream, FileFormatVersion, bool, CancellationToken)
Creates the PST in a stream.
public static Task<PersonalStorage> CreateAsync(Stream stream, FileFormatVersion version,
bool leaveStreamOpen, CancellationToken token = default)
Parameter | Type | Description |
---|---|---|
stream | Stream | The stream in which PST is created. |
version | FileFormatVersion | The PST file version. |
leaveStreamOpen | Boolean | Leave stream open when PersonalStorage is disposed. |
token | CancellationToken | Propagates notification that operations should be canceled. |
Return Value
A PersonalStorage object that represents the new PST.
Exceptions
exception | condition |
---|---|
NotImplementedException | throws if ANSI file version is created |
ArgumentNullException | throws if file name is null or empty |
Remarks
Note, only Unicode file version creation is supported now.
See Also
- enum FileFormatVersion
- class PersonalStorage
- namespace Aspose.Email.Storage.Pst
- assembly Aspose.Email