Skip to content

How to use the continuation marker when listing the contents of a data-lake directory? #1629

Closed Answered by abitofhelp
abitofhelp asked this question in Q&A
Discussion options

You must be logged in to vote

I figured out the issue. Here is the code that works in case someone needs it:

        let data_lake_client = DataLakeClient::new(
            self.account_name.to_owned(),
            self.storage_credentials.to_owned(),
        );

        let file_system_client = data_lake_client.file_system_client(container_name);
        let directory_client = file_system_client.get_directory_client(".");
        let directory_name = "alm";

        let mut page_cnt = 0;
        let mut cnt = 0;
        let mut response = directory_client
            .list_paths()
            .directory(directory_name)
            .recursive(true)
            .max_results(NonZeroU32::new(paging_size).unwrap())
      …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by abitofhelp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant