Hello,
I'm trying to list a directory with 718 directories in it using get_directory_content API function, but I can't make it work.
If I don't use a limit option, or if I use a limit option higher than the number of directories I've got, I can't
get anything from the function. AM I misusing something ?
api_response = ns_api.get_directory_contents(options.path) # does not work
print(api_response) # {'children': None, 'resume': None}
api_response = ns_api.get_directory_contents(options.path, limit=8192) # does not work
print(api_response) # {'children': None, 'resume': None}
api_response = ns_api.get_directory_contents(options.path, limit=1) # does work
print(api_response) # print {'children': [{'access_time': None,
# 'atime_val': None,
# 'block_size': None,
# 'blocks': None,
And even with limit=1, I'm not able to resume the listing after with something like that:
api_response = api.get_directory_contents(directory, detail='name,gid', type='container', limit=1)
while api_response.resume:
api_response = api.get_directory_contents(directory, resume=api_response.resume)
for container in api_response.children:
yield container
Here is a usable gist: https://gist.github.com/jbd/8a5f691e75509dc5397243a105dc61fa
Hello,
I'm trying to list a directory with 718 directories in it using get_directory_content API function, but I can't make it work.
If I don't use a limit option, or if I use a limit option higher than the number of directories I've got, I can't
get anything from the function. AM I misusing something ?
And even with limit=1, I'm not able to resume the listing after with something like that:
Here is a usable gist: https://gist.github.com/jbd/8a5f691e75509dc5397243a105dc61fa