/// <summary> /// Update ACL recusive async function /// </summary> protected override async Task OperationAclResusive(long taskId) { IStorageBlobManagement localChannel = Channel; progressRecord = GetProgressRecord("Update", taskId); continuationToken = this.ContinuationToken; bool foundAFolder = false; DataLakeFileClient fileClient = null; DataLakeDirectoryClient dirClient = null; DataLakeFileSystemClient fileSystem = GetFileSystemClientByName(localChannel, this.FileSystem); foundAFolder = GetExistDataLakeGen2Item(fileSystem, this.Path, out fileClient, out dirClient); if (foundAFolder) { if (ShouldProcess(dirClient.Uri.ToString(), "Update Acl recursively on Directory: ")) { await dirClient.UpdateAccessControlRecursiveAsync(PSPathAccessControlEntry.ParseAccessControls(this.Acl), continuationToken, GetAccessControlChangeOptions(taskId), CmdletCancellationToken).ConfigureAwait(false); SetProgressComplete(); WriteResult(taskId); } } else { if (ShouldProcess(fileClient.Uri.ToString(), "Update Acl recursively on File: ")) { await fileClient.UpdateAccessControlRecursiveAsync(PSPathAccessControlEntry.ParseAccessControls(this.Acl), continuationToken, GetAccessControlChangeOptions(taskId), CmdletCancellationToken).ConfigureAwait(false); SetProgressComplete(); WriteResult(taskId); } } }