FindFoldersWithFolderIdAndView method

Future<FindFoldersResults> FindFoldersWithFolderIdAndView(
  1. FolderId parentFolderId,
  2. FolderView view
)
Obtains a list of folders by searching the sub-folders of the specified folder. The Id of the folder in which to search for folders. The view controlling the number of folders returned.

Implementation

Future<FindFoldersResults> FindFoldersWithFolderIdAndView(
  FolderId parentFolderId,
  FolderView view,
) async {
  EwsUtilities.ValidateParam(parentFolderId, "parentFolderId");
  EwsUtilities.ValidateParam(view, "view");

  ServiceResponseCollection<FindFolderResponse> responses =
      await InternalFindFolders(
        [parentFolderId],
        null,
        /* searchFilter */
        view,
        ServiceErrorHandling.ThrowOnError,
      );

  return responses[0].Results;
}