This function returns a sorted list of files and directories.
Important:
When you disable the FileStorage role, the system disables this function. For more information, read our How to Use Server Profiles documentation.
uapi --output=jsonpretty \ --user=username \ Fileman \ list_files \ dir='public_html'
{- "apiversion": 3,
- "func": "list_files",
- "module": "Fileman",
- "result": {
- "data": {
- "dirs": [
- {
- "absdir": "/home/user",
- "ctime": 1400573272,
- "exists": 1,
- "file": "cgi-bin",
- "fullpath": "/home/user/public_html/cgi-bin",
- "gid": 503,
- "hash": "L2hvbWUvY29saW4vcHVibGljX2h0bWw",
- "humansize": "5 KB",
- "isleaf": 1,
- "isparent": 1,
- "mimename": "text-plain",
- "mimetype": "text/plain",
- "mode": "16877",
- "mtime": 1400573272,
- "nicemode": 755,
- "path": "/home/user/public.html",
- "phash": "L2hvbWUvY29saW4vcHVibGljX2h0bWw",
- "rawmimename": "text-plain",
- "rawmimetype": "text/plain",
- "read": 1,
- "size": 4096,
- "type": "file",
- "uid": 502,
- "write": 1
}
], - "files": [
- {
- "absdir": "/home/user",
- "ctime": 1400573272,
- "exists": 1,
- "file": "cgi-bin",
- "fullpath": "/home/user/public_html/cgi-bin",
- "gid": 503,
- "hash": "L2hvbWUvY29saW4vcHVibGljX2h0bWw",
- "humansize": "5 KB",
- "isleaf": 1,
- "isparent": 1,
- "mimename": "text-plain",
- "mimetype": "text/plain",
- "mode": "16877",
- "mtime": 1400573272,
- "nicemode": 755,
- "path": "/home/user/public.html",
- "phash": "L2hvbWUvY29saW4vcHVibGljX2h0bWw",
- "rawmimename": "text-plain",
- "rawmimetype": "text/plain",
- "read": 1,
- "size": 4096,
- "type": "file",
- "uid": 502,
- "write": 1
}
]
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}