You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 21, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Nov 21, 2026. It is now read-only.
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}
This method is unfortunately not flexible enough to support either an absolute path with / or a relative path under /ifs/ because these language bindings are auto-generated. Thus, if your path is absolute, then you will need to pass it to get_directory_contents as options.path[1:]. Otherwise, if it's relative to /ifs, then you will need to prepend it as 'ifs/' + options.path. Hopefully that helps.
thank you for your answer. I guess my initial message was not clear enough. I've got no problem with the directory_path subtelties but I don't seem to be able to use get_directory_contents correctly.
Here is a full example, I hope it will be easier to follow.
Create a thousand directories on the Isilon cluster
I've got a directory with a '\303' C escape code in it. This is a problem, but I guess this should not make get_directory_contents working incorrectly (or it should raise an exception) and silently fails.
Here is a reproducer:
ISILON-1# mkdir -p /ifs/data/apitest/$(printf 'weird\303_directory')
ISILON-1# ls /ifs/data/apitest
weird_directory
ISILON-1# ls -b /ifs/data/apitest
weird\303_directory
Activity
Atomicology commentedon Oct 31, 2018
@jbd: The
options.pathneeds to be prefixed withifs, so if you are looking to query the directory/ifs/data, then it must be specified as follows:This method is unfortunately not flexible enough to support either an absolute path with
/or a relative path under/ifs/because these language bindings are auto-generated. Thus, if your path is absolute, then you will need to pass it toget_directory_contentsasoptions.path[1:]. Otherwise, if it's relative to/ifs, then you will need to prepend it as'ifs/' + options.path. Hopefully that helps.jbd commentedon Nov 1, 2018
Hi,
thank you for your answer. I guess my initial message was not clear enough. I've got no problem with the directory_path subtelties but I don't seem to be able to use get_directory_contents correctly.
Here is a full example, I hope it will be easier to follow.
I've got no problem to make get_directory_contents to work with this code :
See https://gist.github.com/jbd/3504a32fdc3be782d774198e55711ea4 for the full usable program
This corresponds to default value of the "limit" parameter.
The rest of the tests looks OK:
But if I use another directory with some contents, api_response.children is None :
If I specify an arbitrary limit in the get_directory_contents call, it works until a certain size:
The sweet spot is limit=318:
What could explain this behavior ? The equivalent curl commands with the same user are working fine.
jbd commentedon Nov 1, 2018
I've got a directory with a '\303' C escape code in it. This is a problem, but I guess this should not make get_directory_contents working incorrectly (or it should raise an exception) and silently fails.
Here is a reproducer:
The curl command is working:
jbd commentedon Nov 1, 2018
In the case of the "weird_directory" with the embedded non-printable char, the response.data object is not considered as a valid json here:
isilon_sdk_python/isi_sdk/api_client.py
Line 253 in 1f0fb83
The fact that it cannot be transformed to json seems like the kwargs cannot be build in deserialize_object:
isilon_sdk_python/isi_sdk/api_client.py
Line 669 in 1f0fb83