This function returns the information for a specified file or directory.
Important:
When you disable the File Storage role, the system disables this function.
path required | string <path> The directory from which to list files. Example: path=public_html |
check_for_leaf_directories | integer Default: 0 Whether to flag directories that contain subdirectories.
Example: check_for_leaf_directories=1 |
include_hash | integer Default: 0 Whether to return a hash of the file's information.
Example: include_hash=0 |
include_mime | integer Default: 0 Whether to return the file's MIME type.
Example: include_mime=1 |
include_permissions | integer Default: 0 Whether to parse the file owner's read and write permissions.
Example: include_permissions=1 |
show_hidden | integer Default: 0 Whether to include hidden files in the output.
Example: show_hidden=1 |
apiversion | integer The version of the API. |
func | string The name of the method called. |
module | string The name of the module called. |
object |
uapi --user=username Fileman get_file_information path='public_html'
{- "apiversion": 3,
- "func": "get_file_information",
- "module": "Fileman",
- "result": {
- "data": {
- "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,
- "mimename": "publichtml",
- "mimetype": "text/plain",
- "mode": "16872",
- "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
}
}