Table of Contents

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

account MailAccountId

The caller's account.

parentId LocalMailFolderId?

The folder to create it beneath, or null for the top of the hierarchy.

name string

The name as supplied.

cancellationToken CancellationToken

Propagates caller cancellation.

Returns

Task<LocalMailFolderEditOutcome>

The created folder, or the refusal.

Exceptions

PrincipalNotAuthorizedException

Thrown when the caller does not hold mailfathom.mail.folders.write.