10 Posts
0
1102
Getting content of directory with path > 8198 using OneFS APIs
Hi,
Below is the URI to get the content(files/folders information) of the directory
GET /namespace/access_point/dir_path
As per documentation OneFS API supports a maximum URI length of 8,198 characters.
Is there any solution get the content of the directory with path > 8192?
Thanks,
Sadhana
Peter_Sero
1.2K Posts
0
August 30th, 2021 09:00
Turns out the access point trick doesn't do it -- so the total path limit of 1024 always applies...
Peter_Sero
1.2K Posts
0
August 27th, 2021 09:00
OneFS by itself accepts paths lengths of up to 1024 bytes, so in the API an URI length of 8192 is more than sufficient. Yes, one can have directories deeply nested so that a file's path can be longer than 1024 -- but this file can never be accessed with its full path right from the top /ifs. Usually one would cd into some directory half way down the filesystem hierarchy first, and the access the file with a relative path from there. Or walk down directory by directory until the file in question is in the current working directory.
As the OneFS filesystem API has no notion of a current working directory, this method cannot the applied in general.
The closest way one can get would be to define API 'access points' (check out the API Reference Guide) for the filesytem first, so that an actual URI path will be shortened by the length of the access point path.
hth
-- Peter
SadhanaP
10 Posts
0
August 30th, 2021 10:00
Thanks for the update.