-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[Storage][File] Add async iterator for listing handles in DirectoryClient #5133
Conversation
options: DirectoryListHandlesSegmentOptions = {} | ||
): AsyncIterableIterator<Models.DirectoryListHandlesResponse> { | ||
let listHandlesResponse; | ||
if (!!marker || marker === undefined) { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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( |
There was a problem hiding this comment.
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.
0d7b45f
to
e8210a4
Compare
Resolves #5101