Click or drag to resize
MimeKit

MailStoreGetFolderAsync Method

Asynchronously get the folder for the specified path.

Namespace:  MailKit
Assembly:  MailKit (in MailKit.dll) Version: 2.10.0
Syntax
C#
public abstract Task<IMailFolder> GetFolderAsync(
	string path,
	CancellationToken cancellationToken = null
)

Parameters

path
Type: SystemString
The folder path.
cancellationToken (Optional)
Type: System.ThreadingCancellationToken
The cancellation token.

Return Value

Type: TaskIMailFolder
The folder.

Implements

IMailStoreGetFolderAsync(String, CancellationToken)
Exceptions
ExceptionCondition
ArgumentNullExceptionpath is null.
ObjectDisposedException The MailStore has been disposed.
ServiceNotConnectedException The MailStore is not connected.
ServiceNotAuthenticatedException The MailStore is not authenticated.
OperationCanceledException The operation was canceled via the cancellation token.
FolderNotFoundException The folder could not be found.
IOException An I/O error occurred.
ProtocolException A protocol error occurred.
CommandException The command failed.
Remarks
Asynchronously gets the folder for the specified path.
See Also