Hi, Can anyone tell me exactly how this parameter ...
# help
g
Hi, Can anyone tell me exactly how this parameter is used? https://docs.lakefs.io/reference/api.html#/objects/listObjects
a
It's used to get all entries after a given one. Typically used for pagination - like S3, lakeFS will not return a long list of objects in a single cask.
It's used extensively, for instance here. But basically anywhere that lists and can receive an unbounded number of objects needs to handle pagination.
g
Is that how it is used?
a
after is a key not a number. You will get all elements whose key (pathname) comes after that string.
g
Does it refer to relative path?
I see
Thank you very much for your help.
sunglasses lakefs 1
Another question, if I want to get the files in a specific directory, how should I set the parameters?
a
IIUC, you will want to set
prefix
, see PaginationPrefix. You might also be interested in setting a
delimiter
, see PaginationDelimiter, which will give you the equivalent to directories. All this behaviour is based directly on S3 list-objects-v2. You should be able to base all lakeFS client listing code on the equivalent listing code in some S3 client.
lakefs 1