Method CreateAsync
- Namespace
- MailFathom.Application.Folders.Local
- Assembly
- MailFathom.Application.dll
CreateAsync(MailAccountId, LocalMailFolderId?, string?, CancellationToken)
Creates a folder.
public Task<LocalMailFolderEditOutcome> CreateAsync(MailAccountId account, LocalMailFolderId? parentId, string? name, CancellationToken cancellationToken)
Parameters
accountMailAccountIdThe caller's account.
parentIdLocalMailFolderId?The folder to create it beneath, or null for the top of the hierarchy.
namestringThe name as supplied.
cancellationTokenCancellationTokenPropagates caller cancellation.
Returns
- Task<LocalMailFolderEditOutcome>
The created folder, or the refusal.
Exceptions
- PrincipalNotAuthorizedException
Thrown when the caller does not hold
mailfathom.mail.folders.write.