---
title: "Return file or directory information"
method: GET
path: "/Fileman/get_file_information"
tags: ["Fileman", "Manage Files"]
---

# Return file or directory information

`GET /Fileman/get_file_information`

This function returns the information for a specified file or directory.

**Important:**

When you disable the [File Storage](https://go.cpanel.net/serverroles) role, the system **disables** this function.

## Query parameters

- `path` string, path, required
- `check_for_leaf_directories` 0 | 1
- `include_mime` 0 | 1
- `include_permissions` 0 | 1
- `show_hidden` 0 | 1

## Response `200`

HTTP Request was successful.

- object
  - `apiversion` integer — The version of the API.
  - `func` string — The name of the method called.
  - `module` string — The name of the module called.
  - `result` object
    - `data` object
      - `absdir` string, path — The path to the user's home directory.
      - `ctime` integer — The file's creation time, Unix time format.
      - `exists` 0 | 1 — Whether the file exists in the directory. * `1` - Exists. * `0` - Does **not** exist.
      - `file` string — The filename.
      - `fullpath` string, path — The file's full filepath.
      - `gid` integer — The file owner's system group ID.
      - `humansize` string — The file's formatted size, followed by one of the following symbols: * `KB` - kilobytes * `MB` - megabytes * `GB` - gigabytes
      - `isleaf` 0 | 1 — Whether the directory contains subdirectories. * `1` - Contains subdirectories. * `0` - Does **not** contain subdirectories.
      - `mimename` string — The file's MIME name.
      - `mimetype` string, MIME — The file's MIME type.
      - `mode` string — The file's textual permissions in [Unix format](https://en.wikipedia.org/wiki/File-system_permissions#Notation_of_traditional_Unix_permissions).
      - `mtime` integer — The file's last modification time, in Unix time format.
      - `nicemode` integer — The file's numerical permissions in [octal notation](https://en.wikipedia.org/wiki/File-system_permissions#Notation_of_traditional_Unix_permissions).
      - `path` string, path — The file's path.
      - `rawmimename` string, MIME — The file's raw MIME name.
      - `rawmimetype` string, MIME — The file's raw MIME type.
      - `read` 0 | 1 — Whether the file is readable. The function only returns this value if you set the `include_permissions` value to 1. * `1` - Readable. * `0` - **Not** readable.
      - `size` integer — The file's size, in bytes.
      - `type` 'file' | 'dir' | 'char' | 'block' | 'fifo' | 'link' | 'socket' — The item's type. * `file` - File. * `dir` - Directory. * `char` - Character special device. * `block` - Block special device. * `fifo` - Named pipe. * `link` - Symbolic link. * `socket` - Unix domain socket.
      - `uid` integer — The file owner's system user ID.
      - `write` 0 | 1 — Whether the file is writable. The function only returns this value if you set the `include_permissions` value to 1 . * `1` - Writable. * `0` - Not writable.
    - `errors` string[], nullable — List of errors if the API failed.
    - `messages` string[], nullable — List of messages generated by the API.
    - `metadata` object
    - `status` 0 | 1 — * `1` - Success. * `0` - Failed. Check the errors field for more details.
    - `warnings` string[], nullable — List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running a API.

---

[API](https://skmtc.net/cpanel/apis/cpanel-uapi.md) · [All operations](https://skmtc.net/cpanel/apis/cpanel-uapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cpanel/cpanel-uapi/versions/632e2f8e6d04/schema)
