Represents Personal Storage Table (.pst) file. More...
Inherits IDisposable.
Public Member Functions | |
System::SharedPtr< FolderInfo > | get_RootFolder () const |
Gets the root folder of PST. More... | |
System::SharedPtr< MessageStore > | get_Store () const |
Gets the PST message store. More... | |
FileFormat | get_Format () |
Gets the file format. More... | |
bool | get_CanWrite () |
Gets a value indicating whether the current pst supports writing. More... | |
bool | get_IsUnicode () |
Gets a value indicating whether the PST file format is Unicode. There are two versions of the PST file format: Unicode and ANSI. More... | |
PersonalStorage (Aspose::Email::Exceptions::TraversalExceptionsCallback callback) | |
Initializes a new instance of the PersonalStorage class. Allows setting a callback method for handling exceptions that occur during PST traversal. More... | |
bool | Load (System::String fileName) |
Load PST from file. This method is used when a PersonalStorage object is created using the constructor. More... | |
bool | Load (System::SharedPtr< System::IO::Stream > stream) |
Load PST from stream. This method is used when a PersonalStorage object is created using the constructor. More... | |
VentureLicenseState | GetVentureLicenseState () |
void | SaveAs (System::String fileName, FileFormat format) |
Saves the current object to a specified file format in a different file. More... | |
void | SaveAs (System::SharedPtr< System::IO::Stream > stream, FileFormat format) |
Saves the current object to a specified file format in a stream. More... | |
void | ConvertTo (FileFormat format) |
Converts the current object to the specified format. More... | |
System::SharedPtr< Aspose::Email::Mapi::MapiProperty > | ExtractProperty (System::ArrayPtr< uint8_t > entryId, int64_t tag) |
Gets the specified property of item, without extract the item fully. More... | |
System::SharedPtr< Aspose::Email::Mapi::MapiMessage > | ExtractMessage (System::SharedPtr< MessageInfo > messageInfo) |
Get the message from PST. More... | |
System::SharedPtr< Aspose::Email::Mapi::MapiMessage > | ExtractMessage (System::ArrayPtr< uint8_t > entryId) |
Get the message from PST. More... | |
System::SharedPtr< Aspose::Email::Mapi::MapiMessage > | ExtractMessage (System::String entryId) |
Get the message from PST. More... | |
void | DeleteItem (System::String entryId) |
Deletes the item (folder or message) by it's entryId More... | |
void | SaveMessageToStream (System::String entryId, System::SharedPtr< System::IO::Stream > stream) |
Saves the message, with specified entryID, to a stream. More... | |
System::SharedPtr< System::Collections::Generic::IEnumerable< System::SharedPtr< MessageInfo > > > | EnumerateMessages (System::String entryId) |
Exposes the enumerator, which supports an iteration of messages in folder. More... | |
System::SharedPtr< System::Collections::Generic::IEnumerable< System::SharedPtr< MessageInfo > > > | EnumerateMessages (System::String entryId, int32_t startIndex, int32_t count) |
Exposes the enumerator, which supports an iteration of messages in folder. More... | |
System::SharedPtr< SaveResult > | TryToSaveMessage (System::String entryId, System::SharedPtr< System::IO::Stream > stream) |
Saves the message, with specified entryID, to a stream. More... | |
System::SharedPtr< Aspose::Email::Mapi::MapiAttachmentCollection > | ExtractAttachments (System::SharedPtr< MessageInfo > messageInfo) |
Extracts the attachments. More... | |
System::SharedPtr< Aspose::Email::Mapi::MapiAttachmentCollection > | ExtractAttachments (System::String entryId) |
Extracts the attachments. More... | |
System::SharedPtr< FolderInfo > | GetFolderById (System::ArrayPtr< uint8_t > entryId) |
Gets the personal folder from PST. More... | |
bool | TryToGetFolderById (System::String entryIdString, System::SharedPtr< FolderInfo > &folder) |
Gets the folder associated with the specified entry ID. More... | |
System::SharedPtr< FolderInfo > | GetFolderById (System::String entryIdString) |
Gets the personal folder from PST. More... | |
System::SharedPtr< System::Collections::Generic::IList< System::String > > | FindSubfolders (System::String parentEntryId) |
Finds the identifiers of subfolders for for the current folder. It might be useful in case of reading corrupted pst when the GetSubfolders and EnumerateFolders methods could throw an exception. More... | |
System::SharedPtr< System::Collections::Generic::IList< System::String > > | FindMessages (System::String parentEntryId) |
Finds the identifiers of messages for for the current folder. It might be useful in case of reading corrupted pst when the GetContents and EnumerateMessages methods could throw an exception. More... | |
System::SharedPtr< FolderInfo > | GetParentFolder (System::String entryIdString) |
Gets the parent folder of message. More... | |
System::SharedPtr< FolderInfo > | GetParentFolder (System::ArrayPtr< uint8_t > entryId) |
Gets the parent folder of message. More... | |
System::SharedPtr< FolderInfo > | GetPredefinedFolder (StandardIpmFolder defaultFolder) |
Gets the standard interpersonal message (IPM) folder from PST. Outlook can create a number of default folders, such as Outbox, Deleted Items, Sent Items etc. More... | |
System::SharedPtr< FolderInfo > | CreatePredefinedFolder (System::String name, StandardIpmFolder defaultFolder, bool createHierarchy) |
Creates the standard interpersonal message (IPM) folder. More... | |
System::SharedPtr< FolderInfo > | CreatePredefinedFolder (System::String name, StandardIpmFolder defaultFolder) |
Creates the standard interpersonal message (IPM) folder. More... | |
void | MoveItem (System::SharedPtr< MessageInfo > message, System::SharedPtr< FolderInfo > newFolder) |
Moves a specified message to a new folder within the current pst. More... | |
void | MoveItem (System::SharedPtr< FolderInfo > folder, System::SharedPtr< FolderInfo > newFolder) |
Moves a specified folder to a new parent folder within the current pst. More... | |
void | MergeWith (System::ArrayPtr< System::String > sourceFileNames) |
Merges the pst storage with one or more other pst files. Thus, the combined files are sources. More... | |
void | MergeWith (System::ArrayPtr< System::SharedPtr< System::IO::Stream >> sourceStreams) |
Merges the pst storage with one or more other pst streams. Thus, the combined stream are sources. More... | |
void | SplitInto (int64_t chunkSize, System::String path) |
Splits the pst storage into less sized parts. More... | |
void | SplitInto (System::SharedPtr< System::Collections::Generic::IList< System::SharedPtr< Aspose::Email::Tools::Search::MailQuery >>> criteria, System::String path) |
Splits the pst storage based on criteria. More... | |
void | SplitInto (int64_t chunkSize, System::String partFileNamePrefix, System::String path) |
Splits the pst storage into less sized parts. More... | |
void | SplitInto (System::SharedPtr< System::Collections::Generic::IList< System::SharedPtr< Aspose::Email::Tools::Search::MailQuery >>> criteria, System::String partFileNamePrefix, System::String path) |
Splits the pst storage based on criteria. More... | |
void | ChangeMessage (System::String entryId, System::SharedPtr< Aspose::Email::Mapi::MapiPropertyCollection > updatedProperties) |
Changes the message properties. More... | |
System::SharedPtr< PersonalStorage > | CreateFolderMapping (System::SharedPtr< System::Collections::Generic::Dictionary< uint32_t, uint32_t >> table) |
Clones the folder structure. More... | |
System::SharedPtr< PersonalStorage > | CloneFolderStructure (System::String fileName, System::SharedPtr< System::Collections::Generic::Dictionary< uint32_t, uint32_t >> table) |
Clones the folder structure. More... | |
void | OnStorageProcessed (System::SharedPtr< StorageProcessedEventArgs > e) |
Raises the E:ChunkCreated event. More... | |
void | Dispose () override |
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. More... | |
Static Public Member Functions | |
static System::SharedPtr< PersonalStorage > | FromFile (System::String fileName) |
Load PST from file. More... | |
static System::SharedPtr< PersonalStorage > | FromFile (System::String fileName, bool writable) |
Load PST from file. More... | |
static System::SharedPtr< PersonalStorage > | FromFile (System::String fileName, System::SharedPtr< PersonalStorageLoadOptions > loadOptions) |
Load PST from file. More... | |
static System::SharedPtr< PersonalStorage > | FromStream (System::SharedPtr< System::IO::Stream > stream, bool writable) |
Load PST from stream. More... | |
static System::SharedPtr< PersonalStorage > | FromStream (System::SharedPtr< System::IO::Stream > stream, System::SharedPtr< PersonalStorageLoadOptions > loadOptions) |
Load PST from stream. More... | |
static System::SharedPtr< PersonalStorage > | FromStream (System::SharedPtr< System::IO::Stream > stream) |
Load PST from stream. More... | |
static System::SharedPtr< PersonalStorage > | Create (System::String fileName, FileFormatVersion version) |
Creates the new PST file with the specified file name. More... | |
static System::SharedPtr< PersonalStorage > | Create (System::SharedPtr< System::IO::Stream > stream, FileFormatVersion version) |
Creates the PST in a stream. More... | |
static System::SharedPtr< PersonalStorage > | Create (System::SharedPtr< System::IO::Stream > stream, FileFormatVersion version, bool leaveStreamOpen) |
Creates the PST in a stream. More... | |
Public Attributes | |
System::SharedPtr< PstDoer > | pstDoer |
The pst reader. More... | |
System::Event< void(System::SharedPtr< System::Object >, System::SharedPtr< ItemMovedEventArgs >)> | ItemMoved |
Occurs when an item is moved to the another folder. More... | |
System::Event< void(System::SharedPtr< System::Object >, System::SharedPtr< StorageProcessedEventArgs >)> | StorageProcessed |
Occurs in splitting and merging operations when a new chunk of pst is created or the next file is processed and is to be merged. More... | |
System::Event< void(System::SharedPtr< System::Object >, System::SharedPtr< StorageProcessingEventArgs >)> | StorageProcessing |
Occurs before the srorage is processed. The event is raised before processing the next storage in merging or splitting operations. More... | |
Protected Member Functions | |
virtual void | Dispose (bool disposing) |
Releases unmanaged and - optionally - managed resources. More... | |
virtual | ~PersonalStorage () |
Friends | |
class | Aspose::Email::Storage::Pst::ChunkInfo |
Represents Personal Storage Table (.pst) file.
Aspose::Email::Storage::Pst::PersonalStorage::PersonalStorage | ( | Aspose::Email::Exceptions::TraversalExceptionsCallback | callback | ) |
Initializes a new instance of the PersonalStorage class. Allows setting a callback method for handling exceptions that occur during PST traversal.
callback | The exception callback. |
|
protectedvirtual |
void Aspose::Email::Storage::Pst::PersonalStorage::ChangeMessage | ( | System::String | entryId, |
System::SharedPtr< Aspose::Email::Mapi::MapiPropertyCollection > | updatedProperties | ||
) |
Changes the message properties.
entryId | The entry identifier of message. |
updatedProperties | The updated properties. |
System::NotImplementedException | The ANSI file version editing is not implemented. |
System::InvalidOperationException | The PST is open for reading only. or The entryId is incorrect. |
System::ArgumentNullException | entryIdCollection;The collection of entry ids cannot be null. or updatedProperties;The collection of properties cannot be null. |
System::SharedPtr<PersonalStorage> Aspose::Email::Storage::Pst::PersonalStorage::CloneFolderStructure | ( | System::String | fileName, |
System::SharedPtr< System::Collections::Generic::Dictionary< uint32_t, uint32_t >> | table | ||
) |
Clones the folder structure.
void Aspose::Email::Storage::Pst::PersonalStorage::ConvertTo | ( | FileFormat | format | ) |
Converts the current object to the specified format.
It is used for the fast OST to PST conversion. The method doesn't support conversion of OST created by MS Office 2013 and later versions. To convert an OST of later version, create a new PST and use the MergeWith(Stream[]) method.
format | The FileFormat to convert the current object to. |
|
static |
Creates the PST in a stream.
Note, only Unicode file version creation is supported now.
stream | The stream in which PST is created. |
version | The PST file version. |
NotImplementedException | throws if ANSI file version is created |
ArgumentNullException | throws if stream is null |
|
static |
Creates the PST in a stream.
Note, only Unicode file version creation is supported now.
stream | The stream in which PST is created. |
version | The PST file version. |
leaveStreamOpen | Leave stream open when PersonalStorage is disposed. |
NotImplementedException | throws if ANSI file version is created |
ArgumentNullException | throws if stream is null |
|
static |
Creates the new PST file with the specified file name.
Note, only Unicode file version creation is supported now.
fileName | The full name of the file. |
version | The PST file version. |
NotImplementedException | throws if ANSI file version is created |
ArgumentNullException | throws if file name is null or empty |
System::SharedPtr<PersonalStorage> Aspose::Email::Storage::Pst::PersonalStorage::CreateFolderMapping | ( | System::SharedPtr< System::Collections::Generic::Dictionary< uint32_t, uint32_t >> | table | ) |
Clones the folder structure.
System::SharedPtr<FolderInfo> Aspose::Email::Storage::Pst::PersonalStorage::CreatePredefinedFolder | ( | System::String | name, |
StandardIpmFolder | defaultFolder | ||
) |
Creates the standard interpersonal message (IPM) folder.
name | The name of folder. |
defaultFolder | The value of StandardIpmFolder enumeration. |
System::SharedPtr<FolderInfo> Aspose::Email::Storage::Pst::PersonalStorage::CreatePredefinedFolder | ( | System::String | name, |
StandardIpmFolder | defaultFolder, | ||
bool | createHierarchy | ||
) |
Creates the standard interpersonal message (IPM) folder.
name | The name of folder. |
defaultFolder | The value of StandardIpmFolder enumeration. |
createHierarchy | if set to true , it is possible to create a folder hierarchy using string notation. Backslash ('\') is used as path separator. |
void Aspose::Email::Storage::Pst::PersonalStorage::DeleteItem | ( | System::String | entryId | ) |
Deletes the item (folder or message) by it's entryId
entryId |
|
override |
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
|
protectedvirtual |
Releases unmanaged and - optionally - managed resources.
disposing | true to release both managed and unmanaged resources; false to release only unmanaged resources. |
System::SharedPtr<System::Collections::Generic::IEnumerable<System::SharedPtr<MessageInfo> > > Aspose::Email::Storage::Pst::PersonalStorage::EnumerateMessages | ( | System::String | entryId | ) |
Exposes the enumerator, which supports an iteration of messages in folder.
entryId | The string that represents a parent folder entry ID. |
System::SharedPtr<System::Collections::Generic::IEnumerable<System::SharedPtr<MessageInfo> > > Aspose::Email::Storage::Pst::PersonalStorage::EnumerateMessages | ( | System::String | entryId, |
int32_t | startIndex, | ||
int32_t | count | ||
) |
Exposes the enumerator, which supports an iteration of messages in folder.
entryId | The string that represents a parent folder entry ID. |
startIndex | The start message index. |
count | The number of messages that will be retrieved. |
System::SharedPtr<Aspose::Email::Mapi::MapiAttachmentCollection> Aspose::Email::Storage::Pst::PersonalStorage::ExtractAttachments | ( | System::SharedPtr< MessageInfo > | messageInfo | ) |
Extracts the attachments.
messageInfo | The message information. |
System::SharedPtr<Aspose::Email::Mapi::MapiAttachmentCollection> Aspose::Email::Storage::Pst::PersonalStorage::ExtractAttachments | ( | System::String | entryId | ) |
Extracts the attachments.
entryId | The message entryId. |
System::SharedPtr<Aspose::Email::Mapi::MapiMessage> Aspose::Email::Storage::Pst::PersonalStorage::ExtractMessage | ( | System::ArrayPtr< uint8_t > | entryId | ) |
Get the message from PST.
entryId | EntryId of message. |
System::SharedPtr<Aspose::Email::Mapi::MapiMessage> Aspose::Email::Storage::Pst::PersonalStorage::ExtractMessage | ( | System::SharedPtr< MessageInfo > | messageInfo | ) |
Get the message from PST.
messageInfo | A MessageInfo object that represents information about message. |
System::SharedPtr<Aspose::Email::Mapi::MapiMessage> Aspose::Email::Storage::Pst::PersonalStorage::ExtractMessage | ( | System::String | entryId | ) |
Get the message from PST.
entryId | String representation of EntryId. |
System::SharedPtr<Aspose::Email::Mapi::MapiProperty> Aspose::Email::Storage::Pst::PersonalStorage::ExtractProperty | ( | System::ArrayPtr< uint8_t > | entryId, |
int64_t | tag | ||
) |
Gets the specified property of item, without extract the item fully.
If a property is not found, null is returned.
entryId | The entry id of item. |
tag | The property tag. |
System::SharedPtr<System::Collections::Generic::IList<System::String> > Aspose::Email::Storage::Pst::PersonalStorage::FindMessages | ( | System::String | parentEntryId | ) |
Finds the identifiers of messages for for the current folder. It might be useful in case of reading corrupted pst when the GetContents and EnumerateMessages methods could throw an exception.
parentEntryId | Entry id of the parent folder. |
System::SharedPtr<System::Collections::Generic::IList<System::String> > Aspose::Email::Storage::Pst::PersonalStorage::FindSubfolders | ( | System::String | parentEntryId | ) |
Finds the identifiers of subfolders for for the current folder. It might be useful in case of reading corrupted pst when the GetSubfolders and EnumerateFolders methods could throw an exception.
parentEntryId | Entry id of the parent folder. |
|
static |
Load PST from file.
fileName | Name of .pst file. |
By default, the pst will support writing.
|
static |
Load PST from file.
fileName | Name of .pst file. |
writable | if set to true then the the pst file will support writing, otherwise it will be opened in read-only mode. |
|
static |
Load PST from file.
fileName | Name of .pst file. |
loadOptions | The load options. |
ArgumentNullException | fileName - File name can not be null or empty |
ArgumentException | PersonalStorageLoadOptions.LeaveStreamOpen can not be true. |
|
static |
Load PST from stream.
stream | The System.IO.Stream. |
By default, the pst will support writing.
|
static |
Load PST from stream.
stream | The System.IO.Stream. |
writable | if set to true then the the pst will support writing, otherwise it will be opened in read-only mode. |
|
static |
Load PST from stream.
stream | The System.IO.Stream. |
loadOptions | The load options. |
bool Aspose::Email::Storage::Pst::PersonalStorage::get_CanWrite | ( | ) |
Gets a value indicating whether the current pst supports writing.
FileFormat Aspose::Email::Storage::Pst::PersonalStorage::get_Format | ( | ) |
Gets the file format.
FileFormat that specifies file format.
The .pst and .ost file formats are supported now.
bool Aspose::Email::Storage::Pst::PersonalStorage::get_IsUnicode | ( | ) |
Gets a value indicating whether the PST file format is Unicode. There are two versions of the PST file format: Unicode and ANSI.
System::SharedPtr<FolderInfo> Aspose::Email::Storage::Pst::PersonalStorage::get_RootFolder | ( | ) | const |
Gets the root folder of PST.
FolderInfo that represents a root folder.
System::SharedPtr<MessageStore> Aspose::Email::Storage::Pst::PersonalStorage::get_Store | ( | ) | const |
Gets the PST message store.
The MessageStore which is the rough equivalent of the top of a Mailbox.
System::SharedPtr<FolderInfo> Aspose::Email::Storage::Pst::PersonalStorage::GetFolderById | ( | System::ArrayPtr< uint8_t > | entryId | ) |
System::SharedPtr<FolderInfo> Aspose::Email::Storage::Pst::PersonalStorage::GetFolderById | ( | System::String | entryIdString | ) |
Gets the personal folder from PST.
entryIdString | String representation of entry ID. |
System::SharedPtr<FolderInfo> Aspose::Email::Storage::Pst::PersonalStorage::GetParentFolder | ( | System::ArrayPtr< uint8_t > | entryId | ) |
Gets the parent folder of message.
entryId | Entry Id of message or folder. |
System::SharedPtr<FolderInfo> Aspose::Email::Storage::Pst::PersonalStorage::GetParentFolder | ( | System::String | entryIdString | ) |
Gets the parent folder of message.
entryIdString | String representation of Entry Id of message or folder. |
System::SharedPtr<FolderInfo> Aspose::Email::Storage::Pst::PersonalStorage::GetPredefinedFolder | ( | StandardIpmFolder | defaultFolder | ) |
Gets the standard interpersonal message (IPM) folder from PST. Outlook can create a number of default folders, such as Outbox, Deleted Items, Sent Items etc.
defaultFolder | The value of StandardIpmFolder enumeration. |
VentureLicenseState Aspose::Email::Storage::Pst::PersonalStorage::GetVentureLicenseState | ( | ) |
bool Aspose::Email::Storage::Pst::PersonalStorage::Load | ( | System::SharedPtr< System::IO::Stream > | stream | ) |
Load PST from stream. This method is used when a PersonalStorage object is created using the constructor.
stream | The System.IO.Stream. |
bool Aspose::Email::Storage::Pst::PersonalStorage::Load | ( | System::String | fileName | ) |
Load PST from file. This method is used when a PersonalStorage object is created using the constructor.
fileName | The name of .pst file. |
ArgumentNullException | fileName - File name can not be null or empty |
void Aspose::Email::Storage::Pst::PersonalStorage::MergeWith | ( | System::ArrayPtr< System::SharedPtr< System::IO::Stream >> | sourceStreams | ) |
Merges the pst storage with one or more other pst streams. Thus, the combined stream are sources.
sourceStreams | The source streams. |
ArgumentNullException | "Throws when the stream collection is null." |
ArgumentException | "Throws when the stream in collection is null." |
void Aspose::Email::Storage::Pst::PersonalStorage::MergeWith | ( | System::ArrayPtr< System::String > | sourceFileNames | ) |
Merges the pst storage with one or more other pst files. Thus, the combined files are sources.
sourceFileNames | The source file names. |
ArgumentNullException | "Throws when the filename collection is null." |
ArgumentException | "Throws when the filename in collection is null or empty." |
void Aspose::Email::Storage::Pst::PersonalStorage::MoveItem | ( | System::SharedPtr< FolderInfo > | folder, |
System::SharedPtr< FolderInfo > | newFolder | ||
) |
Moves a specified folder to a new parent folder within the current pst.
folder | The folder to move. |
newFolder | The new parent folder. |
void Aspose::Email::Storage::Pst::PersonalStorage::MoveItem | ( | System::SharedPtr< MessageInfo > | message, |
System::SharedPtr< FolderInfo > | newFolder | ||
) |
Moves a specified message to a new folder within the current pst.
message | The message to move. |
newFolder | The new folder for the message. |
void Aspose::Email::Storage::Pst::PersonalStorage::OnStorageProcessed | ( | System::SharedPtr< StorageProcessedEventArgs > | e | ) |
Raises the E:ChunkCreated event.
e | The StorageProcessedEventArgs instance containing the event data. |
void Aspose::Email::Storage::Pst::PersonalStorage::SaveAs | ( | System::SharedPtr< System::IO::Stream > | stream, |
FileFormat | format | ||
) |
Saves the current object to a specified file format in a stream.
It is used for the fast OST to PST conversion. The method doesn't support conversion of OST created by MS Office 2013 and later versions. To convert an OST of later version, create a new PST and use the MergeWith(Stream[]) method.
stream | The stream to be saved. |
format | The FileFormat is to be used. |
void Aspose::Email::Storage::Pst::PersonalStorage::SaveAs | ( | System::String | fileName, |
FileFormat | format | ||
) |
Saves the current object to a specified file format in a different file.
It is used for the fast OST to PST conversion. The method doesn't support conversion of OST created by MS Office 2013 and later versions. To convert an OST of later version, create a new PST and use the MergeWith(string[]) method.
fileName | The name of the file to be saved. |
format | The FileFormat is to be used when saving a file. |
void Aspose::Email::Storage::Pst::PersonalStorage::SaveMessageToStream | ( | System::String | entryId, |
System::SharedPtr< System::IO::Stream > | stream | ||
) |
Saves the message, with specified entryID, to a stream.
entryId | The entry id. |
stream | The stream for writing. |
void Aspose::Email::Storage::Pst::PersonalStorage::SplitInto | ( | int64_t | chunkSize, |
System::String | partFileNamePrefix, | ||
System::String | path | ||
) |
Splits the pst storage into less sized parts.
chunkSize | The approximate size of a chunk in bytes. |
path | The folder path where chunks will be created. |
partFileNamePrefix | The prefix to be added to the filename of each part of pst. If provided, the prefix will be added to the beginning of each file name. If not provided (null or empty), the pst parts will be created without a prefix. |
The pst file names are produced using the following template: {prefix}_part{number}.pst
ArgumentException | Throws when the path parameter is null or empty. |
ArgumentException | Throws when the chunk size is less then the minimum size of pst file. |
void Aspose::Email::Storage::Pst::PersonalStorage::SplitInto | ( | int64_t | chunkSize, |
System::String | path | ||
) |
Splits the pst storage into less sized parts.
chunkSize | The approximate size of a chunk in bytes. |
path | The folder path where chunks will be created. |
ArgumentException | Throws when the path parameter is null or empty. |
ArgumentException | Throws when the chunk size is less then the minimum size of pst file. |
void Aspose::Email::Storage::Pst::PersonalStorage::SplitInto | ( | System::SharedPtr< System::Collections::Generic::IList< System::SharedPtr< Aspose::Email::Tools::Search::MailQuery >>> | criteria, |
System::String | partFileNamePrefix, | ||
System::String | path | ||
) |
Splits the pst storage based on criteria.
criteria | The collection of MailQuery that represents criteria of pst splitting. |
path | The folder path where chunks will be created. |
///
partFileNamePrefix | The prefix to be added to the filename of each part of pst. If provided, the prefix will be added to the beginning of each file name. If not provided (null or empty), the pst parts will be created without a prefix. |
The pst file names are produced using the following template: {prefix}_part{number}.pst
ArgumentException | Throws when the path parameter is null or empty. |
void Aspose::Email::Storage::Pst::PersonalStorage::SplitInto | ( | System::SharedPtr< System::Collections::Generic::IList< System::SharedPtr< Aspose::Email::Tools::Search::MailQuery >>> | criteria, |
System::String | path | ||
) |
Splits the pst storage based on criteria.
criteria | The collection of MailQuery that represents criteria of pst splitting. |
path | The folder path where chunks will be created. |
ArgumentException | Throws when the path parameter is null or empty. |
bool Aspose::Email::Storage::Pst::PersonalStorage::TryToGetFolderById | ( | System::String | entryIdString, |
System::SharedPtr< FolderInfo > & | folder | ||
) |
Gets the folder associated with the specified entry ID.
entryIdString | The string that represented the entry ID. |
folder | When this method returns true, contains the FolderInfo object associated with the specified ID. |
System::SharedPtr<SaveResult> Aspose::Email::Storage::Pst::PersonalStorage::TryToSaveMessage | ( | System::String | entryId, |
System::SharedPtr< System::IO::Stream > | stream | ||
) |
Saves the message, with specified entryID, to a stream.
entryId | The entry id. |
stream | The stream for writing. |
|
friend |
System::Event<void(System::SharedPtr<System::Object>, System::SharedPtr<ItemMovedEventArgs>)> Aspose::Email::Storage::Pst::PersonalStorage::ItemMoved |
Occurs when an item is moved to the another folder.
System::SharedPtr<PstDoer> Aspose::Email::Storage::Pst::PersonalStorage::pstDoer |
The pst reader.
System::Event<void(System::SharedPtr<System::Object>, System::SharedPtr<StorageProcessedEventArgs>)> Aspose::Email::Storage::Pst::PersonalStorage::StorageProcessed |
Occurs in splitting and merging operations when a new chunk of pst is created or the next file is processed and is to be merged.
System::Event<void(System::SharedPtr<System::Object>, System::SharedPtr<StorageProcessingEventArgs>)> Aspose::Email::Storage::Pst::PersonalStorage::StorageProcessing |
Occurs before the srorage is processed. The event is raised before processing the next storage in merging or splitting operations.