CreateFolder method

Future<void> CreateFolder(
  1. Folder folder,
  2. FolderId parentFolderId
)
Creates a folder. Calling this method results in a call to EWS. The folder. The parent folder id.

Implementation

Future<void> CreateFolder(Folder folder, FolderId parentFolderId) async {
  CreateFolderRequest request =
      new CreateFolderRequest(this, ServiceErrorHandling.ThrowOnError);

  request.Folders = [folder];
  request.ParentFolderId = parentFolderId;

  await request.Execute();
}