Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Storage][File] Add async iterator for listing handles in DirectoryClient #5133

Merged

Conversation

jeremymeng
Copy link
Member

Resolves #5101

options: DirectoryListHandlesSegmentOptions = {}
): AsyncIterableIterator<Models.DirectoryListHandlesResponse> {
let listHandlesResponse;
if (!!marker || marker === undefined) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bterlson As you suggested this seems working to solve the continuation token issue.

Copy link
Member

@HarshaNalluru HarshaNalluru Sep 13, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be done for the other listing methods as well, right? Separate PR?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup all the paged async iterators. If this is good. Fix for othesrs could be in a seperate PR for storage, and another one for master branch.

@@ -556,7 +581,7 @@ export class DirectoryClient extends StorageClient {
* @returns {AsyncIterableIterator<Models.DirectoryListFilesAndDirectoriesSegmentResponse>}
* @memberof DirectoryClient
*/
private async *listSegments(
private async *iterateFilesAndDirectoriesSegments(
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renaming them to avoid confusion between listSegments, listHandlesSegment, etc.

@jeremymeng jeremymeng force-pushed the listhandles-async-iterator branch from 0d7b45f to e8210a4 Compare September 17, 2019 17:33
@jeremymeng jeremymeng merged commit 3d08df9 into Azure:feature/storage Sep 17, 2019
@jeremymeng jeremymeng deleted the listhandles-async-iterator branch September 17, 2019 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants