private async Task ClearContainer(IDatalakeStore dataLakeStore) { IReadOnlyList <DatalakePathItem> list = await dataLakeStore.Search(QueryParameter.Default, CancellationToken.None); list.Should().NotBeNull(); foreach (var fileItem in list.Where(x => x.IsDirectory == true)) { await dataLakeStore.DeleteDirectory(fileItem.Name !, CancellationToken.None); } foreach (var fileItem in list.Where(x => x.IsDirectory == false)) { await dataLakeStore.Delete(fileItem.Name !, token : CancellationToken.None); } }
public async Task <IReadOnlyList <DatalakePathItem> > Search(QueryParameter queryParameter, CancellationToken token = default) => (await _store.Search(queryParameter, token)) .Select(x => x with {