Start a Conversation

Solved!

Go to Solution

1102

August 26th, 2021 22:00

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

 

 

1.2K Posts

August 30th, 2021 09:00

Turns out the access point trick doesn't do it -- so the total path limit of 1024 always applies...

1.2K Posts

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

10 Posts

August 30th, 2021 10:00

Thanks for the update.

No Events found!

Top