Aspose::Email::Storage::Pst::FolderInfo Class Referencefinal

Represents information about personal folder in PST. More...

Inherits Object.

Public Member Functions

System::String get_DisplayName ()
 Gets the display name of folder. More...
 
int32_t get_ContentCount ()
 Gets the total number of items in the folder. More...
 
int32_t get_ContentUnreadCount ()
 Gets the number of unread items in the folder. More...
 
bool get_HasSubFolders ()
 Gets a value indicating whether the Folder object has any subfolders. More...
 
System::String get_ContainerClass ()
 Gets container class of the folder object. More...
 
System::DateTime get_LastModificationTime ()
 Gets the last modification time. More...
 
System::ArrayPtr< uint8_t > get_EntryId () const
 Gets the entry ID. More...
 
System::String get_EntryIdString ()
 Gets string representation of entry ID. More...
 
System::SharedPtr< Aspose::Email::Mapi::MapiPropertyCollectionget_Properties () const
 Gets the folder properties. More...
 
System::SharedPtr< Ndb::NodeId > get_Nid () const
 Gets node Id of Folder PC. More...
 
bool get_IsUnicode ()
 
 FolderInfo ()
 Initializes a new instance of the FolderInfo class. More...
 
 FolderInfo (System::SharedPtr< Ltp::Item > item, System::SharedPtr< PstDoer > doer)
 Initializes a new instance of the FolderInfo class. More...
 
 FolderInfo (System::SharedPtr< Ndb::NodeId > folderNodeId, System::SharedPtr< PstDoer > doer, System::SharedPtr< System::Collections::Generic::IEnumerator< System::SharedPtr< Ltp::PropertyInfo >>> propertyEnumerator)
 
 FolderInfo (System::SharedPtr< Ndb::NodeId > folderNodeId, System::SharedPtr< PstDoer > doer, bool throwExceptionsAndClosePst)
 
void SetProperties (System::SharedPtr< Ndb::NodeId > folderNodeId)
 
 FolderInfo (System::SharedPtr< Ndb::NodeId > folderNodeId, System::SharedPtr< PstDoer > doer)
 Initializes a new instance of the FolderInfo class. More...
 
System::SharedPtr< FolderInfoGetSubFolder (System::String name)
 Get subfolder. More...
 
System::SharedPtr< FolderInfoGetSubFolder (System::String name, bool ignoreCase)
 Gets the subfolder. More...
 
System::SharedPtr< FolderInfoGetSubFolder (System::String name, bool ignoreCase, bool handlePathSeparator)
 Retrieves a subfolder with the specified name from the current folder. More...
 
System::SharedPtr< FolderInfoCollectionGetSubFolders ()
 Gets collection of subfolders. More...
 
System::SharedPtr< FolderInfoCollectionGetSubFolders (FolderKind kind)
 Gets collection of subfolders. More...
 
System::SharedPtr< FolderInfoCollectionGetSubFolders (System::SharedPtr< Aspose::Email::Tools::Search::MailQuery > query)
 Gets collection of subfolders. More...
 
System::SharedPtr< MessageInfoCollectionGetContents (bool tryToReadCorruptedContents)
 Get collection of messages. More...
 
System::SharedPtr< MessageInfoCollectionGetContents ()
 Get collection of messages. More...
 
System::SharedPtr< MessageInfoCollectionGetContents (MessageKind kind)
 Get collection of messages. More...
 
System::SharedPtr< MessageInfoCollectionGetContents (System::SharedPtr< Aspose::Email::Tools::Search::MailQuery > query)
 Get collection of messages. More...
 
System::SharedPtr< MessageInfoCollectionGetContents (int32_t startIndex, int32_t count)
 Gets the collection of messages. More...
 
System::SharedPtr< System::Collections::Generic::IEnumerable< System::SharedPtr< FolderInfo > > > EnumerateFolders ()
 Exposes the enumerator, which supports an iteration of subfolders in folder. More...
 
System::SharedPtr< System::Collections::Generic::IEnumerable< System::SharedPtr< FolderInfo > > > EnumerateFolders (FolderKind kind)
 Exposes the enumerator, which supports an iteration of subfolders in folder. More...
 
System::SharedPtr< System::Collections::Generic::IEnumerable< System::SharedPtr< MessageInfo > > > EnumerateMessages ()
 Exposes the enumerator, which supports an iteration of messages in folder. More...
 
System::SharedPtr< System::Collections::Generic::IEnumerable< System::SharedPtr< Aspose::Email::Mapi::Msg::MessageObject > > > EnumerateMessageObjects ()
 Exposes the enumerator, which supports an iteration of messages in folder. More...
 
System::SharedPtr< System::Collections::Generic::IEnumerable< System::SharedPtr< Aspose::Email::Mapi::MapiMessage > > > EnumerateMapiMessages ()
 Exposes the enumerator, which supports an iteration of messages in folder. More...
 
System::SharedPtr< System::Collections::Generic::IEnumerable< System::String > > EnumerateMessagesEntryId ()
 Enumerates the entryID of messages. More...
 
System::String RetrieveFullPath ()
 Retrieves the full path of folder within the PST file. More...
 
System::SharedPtr< FolderInfoAddSubFolder (System::String name, bool createHierarchy)
 Adds the new sub-folder. More...
 
System::SharedPtr< FolderInfoAddSubFolder (System::String name)
 Adds the new sub-folder. More...
 
System::SharedPtr< FolderInfoAddSubFolder (System::String name, System::String containerClass)
 Adds the new subfolder. More...
 
System::SharedPtr< FolderInfoAddSubFolder (System::String name, System::SharedPtr< FolderCreationOptions > creationOptions)
 Adds a subfolder with the specified name to the current folder using the provided creation options. More...
 
System::String AddMessage (System::SharedPtr< Aspose::Email::Mapi::MapiMessage > message)
 Adds a new message into folder. More...
 
System::String AddFile (System::String fileName, System::String messageClass)
 Adds a file into pst folder. More...
 
System::String AddMapiMessageItem (System::SharedPtr< Aspose::Email::Mapi::IMapiMessageItem > item)
 Adds the IMapiMessageItem object into folder. More...
 
void AddMessages (System::SharedPtr< System::Collections::Generic::IEnumerable< System::SharedPtr< Aspose::Email::Mapi::MapiMessage >>> messages)
 Provides message adding in a bulk mode. More...
 
void MoveContents (System::SharedPtr< FolderInfo > newFolder)
 Moves the contents to a new folder. More...
 
void MoveSubfolders (System::SharedPtr< FolderInfo > newFolder)
 Moves the subfolders to a new parent folder. More...
 
void MergeWith (System::SharedPtr< FolderInfo > sourceFolder)
 Merges the folder with the folder from another pst. More...
 
void MergeWith (System::SharedPtr< FolderInfo > sourceFolder, bool recursiveHandler)
 Merges the folder with the folder from another pst. OnItemMoved event is called on both messages and directories. More...
 
void DeleteChildItem (System::ArrayPtr< uint8_t > entryId)
 Deletes the item (folder or message) by it's entryId. More...
 
void DeleteChildItems (System::SharedPtr< System::Collections::Generic::IEnumerable< System::String >> entryIdCollection)
 Deletes the child messages. More...
 
void UpdateMessage (System::String entryId, System::SharedPtr< Aspose::Email::Mapi::MapiMessageItemBase > updatedMessage)
 Updates the message in folder. More...
 
void ChangeMessages (System::SharedPtr< System::Collections::Generic::IEnumerable< System::String >> entryIdCollection, System::SharedPtr< Aspose::Email::Mapi::MapiPropertyCollection > updatedProperties)
 Changes the messages in folder. More...
 
void ChangeMessages (System::SharedPtr< Aspose::Email::Mapi::MapiPropertyCollection > updatedProperties)
 Changes all messages in folder. More...
 
void ChangeContainerClass (System::String containerClass)
 Changes the container class. More...
 
void ChangeDisplayName (System::String newName)
 Changes the display name. More...
 
void ChangeMessageCount (int32_t delta, int32_t unreadDelta, bool deletion)
 Changes the message count. More...
 
void UpdateSubfoldersProperty (uint8_t value)
 Updates the sub-folders property. More...
 
System::SharedPtr< System::Collections::Generic::IEnumerable< System::SharedPtr< MessageInfo > > > EnumerateMessages (System::SharedPtr< Aspose::Email::Tools::Search::MailQuery > mailQuery)
 Enumerates the messages. More...
 
bool IsStandardIpmFolder ()
 Determines whether [is standard ipm folder]. More...
 
StandardIpmFolder GetPredefinedType (bool getForTopLevelParent)
 Gets the type of predefined folder. More...
 

Public Attributes

System::Event< void(System::SharedPtr< System::Object >, System::SharedPtr< MessageAddedEventArgs >)> MessageAdded
 Occurs when a message is added to the current folder. More...
 
System::Event< void(System::SharedPtr< System::Object >, System::SharedPtr< ItemMovedEventArgs >)> ItemMoved
 Occurs when an item is moved to the another folder. More...
 

Protected Member Functions

virtual ~FolderInfo ()
 

Friends

class Aspose::Email::Storage::Pst::PersonalStorage
 
class Aspose::Email::Storage::Pst::PstDoer
 
class Aspose::Email::Storage::Pst::PstUtil
 

Detailed Description

Represents information about personal folder in PST.

Constructor & Destructor Documentation

◆ FolderInfo() [1/5]

Aspose::Email::Storage::Pst::FolderInfo::FolderInfo ( )

Initializes a new instance of the FolderInfo class.

◆ FolderInfo() [2/5]

Aspose::Email::Storage::Pst::FolderInfo::FolderInfo ( System::SharedPtr< Ltp::Item >  item,
System::SharedPtr< PstDoer >  doer 
)

Initializes a new instance of the FolderInfo class.

Parameters
doerThe doer.
itemThe item.

◆ FolderInfo() [3/5]

Aspose::Email::Storage::Pst::FolderInfo::FolderInfo ( System::SharedPtr< Ndb::NodeId >  folderNodeId,
System::SharedPtr< PstDoer >  doer,
System::SharedPtr< System::Collections::Generic::IEnumerator< System::SharedPtr< Ltp::PropertyInfo >>>  propertyEnumerator 
)

◆ FolderInfo() [4/5]

Aspose::Email::Storage::Pst::FolderInfo::FolderInfo ( System::SharedPtr< Ndb::NodeId >  folderNodeId,
System::SharedPtr< PstDoer >  doer,
bool  throwExceptionsAndClosePst 
)

◆ FolderInfo() [5/5]

Aspose::Email::Storage::Pst::FolderInfo::FolderInfo ( System::SharedPtr< Ndb::NodeId >  folderNodeId,
System::SharedPtr< PstDoer >  doer 
)

Initializes a new instance of the FolderInfo class.

Parameters
doerThe doer.
folderNodeIdThe folder node identifier.
Exceptions
System::ArgumentExceptionNode Id can not be null or zero;folderNodeId
System::InvalidOperationExceptionCould not read folder

◆ ~FolderInfo()

virtual Aspose::Email::Storage::Pst::FolderInfo::~FolderInfo ( )
protectedvirtual

Member Function Documentation

◆ AddFile()

System::String Aspose::Email::Storage::Pst::FolderInfo::AddFile ( System::String  fileName,
System::String  messageClass 
)

Adds a file into pst folder.

Parameters
fileNameThe name of file necessary to add.
messageClassThe message class.
Returns
The string that represents the EntryId of the added message.
Exceptions
NotImplementedExceptionthrows, if a PST file version is ANSI.
ArgumentNullExceptionthrows, if a name of file to add is null or empty.
InvalidOperationExceptionthrows, if a PST is open for reading only.

◆ AddMapiMessageItem()

System::String Aspose::Email::Storage::Pst::FolderInfo::AddMapiMessageItem ( System::SharedPtr< Aspose::Email::Mapi::IMapiMessageItem item)

Adds the IMapiMessageItem object into folder.

Parameters
itemThe item necessary to add.
Exceptions
NotImplementedExceptionthrows, if a PST file version is ANSI.
ArgumentNullExceptionthrows, if an item to add is null.
InvalidOperationExceptionthrows, if a PST is open for reading only.
System::NotSupportedExceptionThrown when MessageClass doesn't belong to IPM.Note, IPM.StickyNote, IPM.Contact, IPM.Activity, IPM.Appointment, IPM.Schedule.meeting, IPM.Task.
InvalidOperationExceptionThrown when MessageClass doesn't correspond to the folder's ContainerClass.
Returns
The string that represents the EntryId of the added item.

◆ AddMessage()

System::String Aspose::Email::Storage::Pst::FolderInfo::AddMessage ( System::SharedPtr< Aspose::Email::Mapi::MapiMessage message)

Adds a new message into folder.

Parameters
messageThe message necessary to add.
Returns
The string that represents the EntryId of the added message.
Exceptions
NotImplementedExceptionthrows, if a PST file version is ANSI.
ArgumentNullExceptionthrows, if a message to add is null.
InvalidOperationExceptionthrows, if a PST is open for reading only.

◆ AddMessages()

void Aspose::Email::Storage::Pst::FolderInfo::AddMessages ( System::SharedPtr< System::Collections::Generic::IEnumerable< System::SharedPtr< Aspose::Email::Mapi::MapiMessage >>>  messages)

Provides message adding in a bulk mode.

Parameters
messagesAn T:System::Collections::IEnumerator representing the enumerator, which supports iteration over a collection of MapiMessage.

◆ AddSubFolder() [1/4]

System::SharedPtr<FolderInfo> Aspose::Email::Storage::Pst::FolderInfo::AddSubFolder ( System::String  name)

Adds the new sub-folder.

Parameters
nameThe name of sub-folder.
Returns
The new sub-folder.
Exceptions
NotImplementedExceptionthrows, if a PST file version is ANSI.
ArgumentNullExceptionthrows, if a sub-folder name is null or empty.
InvalidOperationExceptionthrows, if a PST is open for reading only.
InvalidOperationExceptionthrows, if a folder with same name already exists. The comparison will be case-insensitive, and the folder creation operation will consider folders with the same name but different casing as duplicates.

◆ AddSubFolder() [2/4]

System::SharedPtr<FolderInfo> Aspose::Email::Storage::Pst::FolderInfo::AddSubFolder ( System::String  name,
bool  createHierarchy 
)

Adds the new sub-folder.

Parameters
nameThe name of sub-folder.
createHierarchyif set to true, it is possible to create a folder hierarchy using string notation. Backslash ('\') is used as path separator.
Returns
The new sub-folder.
Exceptions
NotImplementedExceptionthrows, if a PST file version is ANSI.
ArgumentNullExceptionthrows, if a sub-folder name is null or empty.
InvalidOperationExceptionthrows, if a PST is open for reading only.

◆ AddSubFolder() [3/4]

System::SharedPtr<FolderInfo> Aspose::Email::Storage::Pst::FolderInfo::AddSubFolder ( System::String  name,
System::SharedPtr< FolderCreationOptions creationOptions 
)

Adds a subfolder with the specified name to the current folder using the provided creation options.

Parameters
nameThe name of the subfolder to add.
creationOptionsThe options for creating the subfolder.
Returns
The FolderInfo representing the added subfolder.

The name parameter specifies the name of the subfolder to add. The creationOptions parameter allows customization of the subfolder creation behavior, such as specifying whether to create the hierarchy of parent folders and the container class of the new subfolder. If the subfolder with the specified name already exists, the behavior depends on the value of FolderCreationOptions::AllowNameCaseDifference. If FolderCreationOptions::AllowNameCaseDifference is set to true, a difference in name casing will be allowed, and the subfolder will be added even if an existing folder with the same name but in a different case exists. If FolderCreationOptions::AllowNameCaseDifference is set to false, the comparison will be case-insensitive, and an InvalidOperationException will be thrown to indicate that a folder with the specified name already exists. The name may contain backslash () as the path separators (for example, "parent1\parent2\subfolder"). In this case if FolderCreationOptions::CreateHierarchy is set to true, the hierarchy of parent folders should be created.

Exceptions
NotImplementedExceptionthrows, if a PST file version is ANSI.
ArgumentNullExceptionthrows, if a subfolder name is null or empty.
InvalidOperationExceptionthrows, if a PST is open for reading only.
InvalidOperationExceptionthrows, if a folder with same name already exists. Whether folders have the same name will depend on the FolderCreationOptions::AllowNameCaseDifference parameter.

◆ AddSubFolder() [4/4]

System::SharedPtr<FolderInfo> Aspose::Email::Storage::Pst::FolderInfo::AddSubFolder ( System::String  name,
System::String  containerClass 
)

Adds the new subfolder.

Parameters
nameThe name of subfolder.
containerClassContainer class of the sub-Folder object.
Returns
The new subfolder.
Exceptions
NotImplementedExceptionthrows, if a PST file version is ANSI.
ArgumentNullExceptionthrows, if a subfolder name is null or empty.
InvalidOperationExceptionthrows, if a PST is open for reading only.
InvalidOperationExceptionthrows, if a folder with same name already exists. The comparison will be case-insensitive, and the folder creation operation will consider folders with the same name but different casing as duplicates.

◆ ChangeContainerClass()

void Aspose::Email::Storage::Pst::FolderInfo::ChangeContainerClass ( System::String  containerClass)

Changes the container class.

Parameters
containerClassContainer class of the of the folder object.
Exceptions
InvalidOperationExceptionthrows, if a PST is open for reading only.
NotImplementedExceptionthrows, if a PST file version is ANSI.

◆ ChangeDisplayName()

void Aspose::Email::Storage::Pst::FolderInfo::ChangeDisplayName ( System::String  newName)

Changes the display name.

Parameters
newNameA new name.
Exceptions
InvalidOperationExceptionthrows, if a PST is open for reading only.
NotImplementedExceptionthrows, if a PST file version is ANSI.

◆ ChangeMessageCount()

void Aspose::Email::Storage::Pst::FolderInfo::ChangeMessageCount ( int32_t  delta,
int32_t  unreadDelta,
bool  deletion 
)

Changes the message count.

Parameters
deltaTotal count variation.
unreadDeltaUnread count variation.
deletionIf true then variation is negative.

◆ ChangeMessages() [1/2]

void Aspose::Email::Storage::Pst::FolderInfo::ChangeMessages ( System::SharedPtr< Aspose::Email::Mapi::MapiPropertyCollection updatedProperties)

Changes all messages in folder.

Parameters
updatedPropertiesThe updated properties.
Exceptions
System::NotImplementedExceptionThe ANSI file version editing is not implemented.
System::InvalidOperationExceptionThe PST is open for reading only. or The entryId is incorrect.
System::ArgumentNullExceptionentryIdCollection;The collection of entry ids cannot be null. or updatedProperties;The collection of properties cannot be null.

◆ ChangeMessages() [2/2]

void Aspose::Email::Storage::Pst::FolderInfo::ChangeMessages ( System::SharedPtr< System::Collections::Generic::IEnumerable< System::String >>  entryIdCollection,
System::SharedPtr< Aspose::Email::Mapi::MapiPropertyCollection updatedProperties 
)

Changes the messages in folder.

Parameters
entryIdCollectionThe entry identifier collection.
updatedPropertiesThe updated properties.
Exceptions
System::NotImplementedExceptionThe ANSI file version editing is not implemented.
System::InvalidOperationExceptionThe PST is open for reading only. or The entryId is incorrect.
System::ArgumentNullExceptionentryIdCollection;The collection of entry ids cannot be null. or updatedProperties;The collection of properties cannot be null.

◆ DeleteChildItem()

void Aspose::Email::Storage::Pst::FolderInfo::DeleteChildItem ( System::ArrayPtr< uint8_t >  entryId)

Deletes the item (folder or message) by it's entryId.

The item must be contained in a folder.

Parameters
entryIdThe entry id.
Exceptions
ArgumentNullExceptionthrows, if entryId is null.
InvalidOperationExceptionthrows, if the item doesn't belong to the folder or the item can't be deleted or entryID has the incorrect value.
InvalidOperationExceptionthrows, if a PST is open for reading only.

◆ DeleteChildItems()

void Aspose::Email::Storage::Pst::FolderInfo::DeleteChildItems ( System::SharedPtr< System::Collections::Generic::IEnumerable< System::String >>  entryIdCollection)

Deletes the child messages.

Parameters
entryIdCollectionThe entry id collection.
Exceptions
System::NotImplementedExceptionThe ANSI file version editing is not implemented.
System::InvalidOperationExceptionThe PST is open for reading only. or The item, to be deleted, doesn't belong to this folder. or The search folder cannot be deleted. or The \Deleted Items\ folder cannot be deleted. or The entryId is incorrect.
System::ArgumentNullExceptionentryId;The entryId cannot be null.

◆ EnumerateFolders() [1/2]

System::SharedPtr<System::Collections::Generic::IEnumerable<System::SharedPtr<FolderInfo> > > Aspose::Email::Storage::Pst::FolderInfo::EnumerateFolders ( )

Exposes the enumerator, which supports an iteration of subfolders in folder.

Returns
System::Collections::Generic::IEnumerable<T>, that represents an enumerator that iterates through a subfolders in folder.

◆ EnumerateFolders() [2/2]

System::SharedPtr<System::Collections::Generic::IEnumerable<System::SharedPtr<FolderInfo> > > Aspose::Email::Storage::Pst::FolderInfo::EnumerateFolders ( FolderKind  kind)

Exposes the enumerator, which supports an iteration of subfolders in folder.

Parameters
kindThe FolderKind that represents kind of folder.
Returns
System::Collections::Generic::IEnumerable<T>, that represents an enumerator that iterates through a subfolders in folder.

◆ EnumerateMapiMessages()

System::SharedPtr<System::Collections::Generic::IEnumerable<System::SharedPtr<Aspose::Email::Mapi::MapiMessage> > > Aspose::Email::Storage::Pst::FolderInfo::EnumerateMapiMessages ( )

Exposes the enumerator, which supports an iteration of messages in folder.

Returns
System::Collections::Generic::IEnumerable<T>, that represents an enumerator that iterates through a messages in folder.

◆ EnumerateMessageObjects()

System::SharedPtr<System::Collections::Generic::IEnumerable<System::SharedPtr<Aspose::Email::Mapi::Msg::MessageObject> > > Aspose::Email::Storage::Pst::FolderInfo::EnumerateMessageObjects ( )

Exposes the enumerator, which supports an iteration of messages in folder.

Returns
System::Collections::Generic::IEnumerable<T>, that represents an enumerator that iterates through a messages in folder.

◆ EnumerateMessages() [1/2]

System::SharedPtr<System::Collections::Generic::IEnumerable<System::SharedPtr<MessageInfo> > > Aspose::Email::Storage::Pst::FolderInfo::EnumerateMessages ( )

Exposes the enumerator, which supports an iteration of messages in folder.

Returns
System::Collections::Generic::IEnumerable<T>, that represents an enumerator that iterates through a messages in folder.

◆ EnumerateMessages() [2/2]

System::SharedPtr<System::Collections::Generic::IEnumerable<System::SharedPtr<MessageInfo> > > Aspose::Email::Storage::Pst::FolderInfo::EnumerateMessages ( System::SharedPtr< Aspose::Email::Tools::Search::MailQuery mailQuery)

Enumerates the messages.

Parameters
mailQueryThe mail query.
Returns

◆ EnumerateMessagesEntryId()

System::SharedPtr<System::Collections::Generic::IEnumerable<System::String> > Aspose::Email::Storage::Pst::FolderInfo::EnumerateMessagesEntryId ( )

Enumerates the entryID of messages.

Returns
System::Collections::Generic::IEnumerable<T>, that represents an enumerator that iterates through entryID of messages in folder.

◆ get_ContainerClass()

System::String Aspose::Email::Storage::Pst::FolderInfo::get_ContainerClass ( )

Gets container class of the folder object.

The container class.

◆ get_ContentCount()

int32_t Aspose::Email::Storage::Pst::FolderInfo::get_ContentCount ( )

Gets the total number of items in the folder.

The content count.

◆ get_ContentUnreadCount()

int32_t Aspose::Email::Storage::Pst::FolderInfo::get_ContentUnreadCount ( )

Gets the number of unread items in the folder.

The content unread count.

◆ get_DisplayName()

System::String Aspose::Email::Storage::Pst::FolderInfo::get_DisplayName ( )

Gets the display name of folder.

The display name.

◆ get_EntryId()

System::ArrayPtr<uint8_t> Aspose::Email::Storage::Pst::FolderInfo::get_EntryId ( ) const

Gets the entry ID.

The entry id.

◆ get_EntryIdString()

System::String Aspose::Email::Storage::Pst::FolderInfo::get_EntryIdString ( )

Gets string representation of entry ID.

The entry id string.

◆ get_HasSubFolders()

bool Aspose::Email::Storage::Pst::FolderInfo::get_HasSubFolders ( )

Gets a value indicating whether the Folder object has any subfolders.

The has sub folders.

◆ get_IsUnicode()

bool Aspose::Email::Storage::Pst::FolderInfo::get_IsUnicode ( )

◆ get_LastModificationTime()

System::DateTime Aspose::Email::Storage::Pst::FolderInfo::get_LastModificationTime ( )

Gets the last modification time.

The last modification time. If the folder doesn't have PR_LAST_MODIFICATION_TIME property, DateTime.MinValue is returned.

◆ get_Nid()

System::SharedPtr<Ndb::NodeId> Aspose::Email::Storage::Pst::FolderInfo::get_Nid ( ) const

Gets node Id of Folder PC.

◆ get_Properties()

System::SharedPtr<Aspose::Email::Mapi::MapiPropertyCollection> Aspose::Email::Storage::Pst::FolderInfo::get_Properties ( ) const

Gets the folder properties.

◆ GetContents() [1/5]

System::SharedPtr<MessageInfoCollection> Aspose::Email::Storage::Pst::FolderInfo::GetContents ( )

Get collection of messages.

Returns
Collection of MessageInfo.

◆ GetContents() [2/5]

System::SharedPtr<MessageInfoCollection> Aspose::Email::Storage::Pst::FolderInfo::GetContents ( bool  tryToReadCorruptedContents)

Get collection of messages.

Parameters
tryToReadCorruptedContentsIf the value of this parameter is true, the method will try to read the content even if the file is corrupted. This value can be used if the GetContents() method throws an exception about the file corruption. If the value of this parameter is false, the method works in the same way as GetContents() method without parameters.
Returns
Collection of MessageInfo.

◆ GetContents() [3/5]

System::SharedPtr<MessageInfoCollection> Aspose::Email::Storage::Pst::FolderInfo::GetContents ( int32_t  startIndex,
int32_t  count 
)

Gets the collection of messages.

Parameters
startIndexThe start message index.
countThe number of messages that will be retrieved.
Returns
Collection of MessageInfo.

If "count" param is less than 0 or more than remained message count then remained message count will be returned.

Exceptions
ArgumentOutOfRangeExceptionthrows, if startIndex less than 0.
ArgumentOutOfRangeExceptionthrows, if startIndex more or equal to total message count that folder contains.

◆ GetContents() [4/5]

System::SharedPtr<MessageInfoCollection> Aspose::Email::Storage::Pst::FolderInfo::GetContents ( MessageKind  kind)

Get collection of messages.

Parameters
kindThe message kind.
Returns
Collection of MessageInfo.

◆ GetContents() [5/5]

System::SharedPtr<MessageInfoCollection> Aspose::Email::Storage::Pst::FolderInfo::GetContents ( System::SharedPtr< Aspose::Email::Tools::Search::MailQuery query)

Get collection of messages.

Parameters
queryMailQuery that represents search query.
Returns
Collection of MessageInfo.

◆ GetPredefinedType()

StandardIpmFolder Aspose::Email::Storage::Pst::FolderInfo::GetPredefinedType ( bool  getForTopLevelParent)

Gets the type of predefined folder.

Parameters
getForTopLevelParentIf true, returns the predefined type for the top-level parent folder. This determines whether the current folder is a subfolder of a predefined folder. If false, it returns the predefined type for the current folder.

Checks if the folder is predefined by returning the corresponding type.

Returns
The StandardIpmFolder enum value. If the folder is not predefined, it returns StandardIpmFolder::Unspecified

◆ GetSubFolder() [1/3]

System::SharedPtr<FolderInfo> Aspose::Email::Storage::Pst::FolderInfo::GetSubFolder ( System::String  name)

Get subfolder.

Parameters
nameName of subfolder.
Returns
A FolderInfo object.

◆ GetSubFolder() [2/3]

System::SharedPtr<FolderInfo> Aspose::Email::Storage::Pst::FolderInfo::GetSubFolder ( System::String  name,
bool  ignoreCase 
)

Gets the subfolder.

Parameters
nameName of subfolder.
ignoreCaseIndicates that a search should ignore case sensitivity when matching the folder name.
Returns
A FolderInfo object.

◆ GetSubFolder() [3/3]

System::SharedPtr<FolderInfo> Aspose::Email::Storage::Pst::FolderInfo::GetSubFolder ( System::String  name,
bool  ignoreCase,
bool  handlePathSeparator 
)

Retrieves a subfolder with the specified name from the current folder.

Parameters
nameThe name of the subfolder to retrieve.
ignoreCaseSpecifies whether to perform a case-insensitive search for folders with the given name.
handlePathSeparatorSpecifies whether the specified folder name should be treated as a path if it contains backslashes.
Returns
The FolderInfo representing the retrieved subfolder, or null if the subfolder is not found.

The name parameter specifies the name of the subfolder to retrieve.

The ignoreCase parameter determines whether the search for the subfolder name should be case-sensitive or case-insensitive. If set to true, the search will be case-insensitive, otherwise, it will be case-sensitive.

The handlePathSeparator parameter specifies whether the specified folder name should be treated as a path if it contains backslashes. If set to true, the method will interpret the folder name as a path, attempting to navigate to the subfolder using the path. If set to false, the method will treat the folder name as a simple name, searching for a subfolder with an exact name match.

If the subfolder is found, the method returns the FolderInfo object representing the retrieved subfolder. If the subfolder is not found, the method returns null.

◆ GetSubFolders() [1/3]

System::SharedPtr<FolderInfoCollection> Aspose::Email::Storage::Pst::FolderInfo::GetSubFolders ( )

Gets collection of subfolders.

Returns
The FolderInfo collection.

◆ GetSubFolders() [2/3]

System::SharedPtr<FolderInfoCollection> Aspose::Email::Storage::Pst::FolderInfo::GetSubFolders ( FolderKind  kind)

Gets collection of subfolders.

Parameters
kindThe FolderKind that represents kind of folder.
Returns
The FolderInfo collection.

◆ GetSubFolders() [3/3]

System::SharedPtr<FolderInfoCollection> Aspose::Email::Storage::Pst::FolderInfo::GetSubFolders ( System::SharedPtr< Aspose::Email::Tools::Search::MailQuery query)

Gets collection of subfolders.

Parameters
queryMailQuery that represents search query.
Returns
The FolderInfo collection.

◆ IsStandardIpmFolder()

bool Aspose::Email::Storage::Pst::FolderInfo::IsStandardIpmFolder ( )

Determines whether [is standard ipm folder].

Returns
true if [is standard ipm folder]; otherwise, false.

◆ MergeWith() [1/2]

void Aspose::Email::Storage::Pst::FolderInfo::MergeWith ( System::SharedPtr< FolderInfo sourceFolder)

Merges the folder with the folder from another pst.

Parameters
sourceFolderThe source folder.
Exceptions
InvalidOperationExceptionThrows when the source folder is located in the same pst.

◆ MergeWith() [2/2]

void Aspose::Email::Storage::Pst::FolderInfo::MergeWith ( System::SharedPtr< FolderInfo sourceFolder,
bool  recursiveHandler 
)

Merges the folder with the folder from another pst. OnItemMoved event is called on both messages and directories.

Parameters
sourceFolderThe source folder.
recursiveHandlerIf true, OnItemMoved will be called on all messages, including messages in sub-directories, otherwise OnItemMoved will be called only for messages in the current directory.
Exceptions
InvalidOperationExceptionThrows when the source folder is located in the same pst.

◆ MoveContents()

void Aspose::Email::Storage::Pst::FolderInfo::MoveContents ( System::SharedPtr< FolderInfo newFolder)

Moves the contents to a new folder.

Parameters
newFolderThe new folder.

◆ MoveSubfolders()

void Aspose::Email::Storage::Pst::FolderInfo::MoveSubfolders ( System::SharedPtr< FolderInfo newFolder)

Moves the subfolders to a new parent folder.

Parameters
newFolderThe new parent folder.

◆ RetrieveFullPath()

System::String Aspose::Email::Storage::Pst::FolderInfo::RetrieveFullPath ( )

Retrieves the full path of folder within the PST file.

Returns
The string that represents the full path.

◆ SetProperties()

void Aspose::Email::Storage::Pst::FolderInfo::SetProperties ( System::SharedPtr< Ndb::NodeId >  folderNodeId)

◆ UpdateMessage()

void Aspose::Email::Storage::Pst::FolderInfo::UpdateMessage ( System::String  entryId,
System::SharedPtr< Aspose::Email::Mapi::MapiMessageItemBase updatedMessage 
)

Updates the message in folder.

Parameters
entryIdThe message entry identifier.
updatedMessageThe updated message.
Exceptions
System::NotImplementedExceptionThe ANSI file version editing is not implemented.
System::InvalidOperationExceptionThe PST is open for reading only. or The entryId is incorrect.
System::ArgumentNullExceptionentryId; The entry id cannot be null or empty. or updatedMessage; The message cannot be null.

◆ UpdateSubfoldersProperty()

void Aspose::Email::Storage::Pst::FolderInfo::UpdateSubfoldersProperty ( uint8_t  value)

Updates the sub-folders property.

Parameters
valueThe property value.

Friends And Related Function Documentation

◆ Aspose::Email::Storage::Pst::PersonalStorage

◆ Aspose::Email::Storage::Pst::PstDoer

Aspose::Email::Storage::Pst::PstDoer
friend

◆ Aspose::Email::Storage::Pst::PstUtil

friend class Aspose::Email::Storage::Pst::PstUtil
friend

Member Data Documentation

◆ ItemMoved

System::Event<void(System::SharedPtr<System::Object>, System::SharedPtr<ItemMovedEventArgs>)> Aspose::Email::Storage::Pst::FolderInfo::ItemMoved

Occurs when an item is moved to the another folder.

◆ MessageAdded

System::Event<void(System::SharedPtr<System::Object>, System::SharedPtr<MessageAddedEventArgs>)> Aspose::Email::Storage::Pst::FolderInfo::MessageAdded

Occurs when a message is added to the current folder.