/api/v0/ls
List directory contents for Unix filesystem objects.
Arguments
arg[string]: The path to the IPFS object(s) to list links from. Required: yes.headers[bool]: Print table headers (Hash, Size, Name). Required: no.resolve-type[bool]: Resolve linked objects to find out their types. Default:true. Required: no.size[bool]: Resolve linked objects to find out their file size. Default:true. Required: no.stream[bool]: Enable experimental streaming of directory entries as they are traversed. Required: no.
Response
On success, the call to this endpoint will return with 200 and the following body:
{
"Objects": [
{
"Hash": "<string>",
"Links": [
{
"Hash": "<string>",
"ModTime": "<timestamp>",
"Mode": "<uint32>",
"Name": "<string>",
"Size": "<uint64>",
"Target": "<string>",
"Type": "<int32>"
}
]
}
]
}
cURL Example
curl -X POST "http://127.0.0.1:5001/api/v0/ls?arg=<ipfs-path>&headers=<value>&resolve-type=true&size=true&stream=<value>"
Last updated