Description
This function lists file information.
Warning:
Examples
Note:
Use cPanel's API Shell interface (Home >> Advanced >> API Shell) to directly test cPanel API calls.
Parameters
Parameter |
Type |
Description |
Possible values |
Example |
dir |
string |
The path to the file's directory. |
A valid directory path, relative to the user's home directory. |
public_html/my_directory |
files |
string |
Required The file's name. |
A valid file name. Note: Separate multiple files with the pipe character (|). |
file.html |
Returns
Return |
Type |
Description |
Possible values |
Example |
mode |
string |
The file's permissions. |
A set of file permissions, in textual representation format. |
33188 |
file |
string |
The file's name. |
A valid filename. |
file.html |
rawmimetype |
string |
The file's MIME type. |
A valid MIME type. |
text/html |
nicemode |
integer |
The file's permissions. |
A set of file permissions, in octal notation format. |
0777 |
size |
integer |
The size of the file. |
A positive integer, in bytes. |
4096 |
humansize |
string |
The formatted size of the file. |
A positive integer, in Megabytes (MB), Kilobytes (KB), or Gigabytes (GB). |
4 KB |
group |
string |
The file owner's system group name. |
A valid group name. |
example |
fullpath |
string |
The absolute path to the file. |
A valid absolute file path. |
/home/example/public_html/file.html |
user |
string |
The file owner's system user name. |
A valid system username. |
example |
ctime |
integer |
The file's creation time. |
A Unix time stamp. |
1371711650 |
uid |
integer |
The file owner's user ID. |
A valid user ID on the server. |
517 |
mtime |
integer |
The file's last modification time. |
A Unix time stamp. |
1411211655
|
mimename |
string |
The file's MIME name. |
A valid MIME name. |
text-html |
path |
string |
The absolute path to the file. |
A valid absolute file path. This value does not include the file or directory name. |
/home/example/public_html |
mimeinfo |
string |
The file's MIME type. |
A valid MIME type. |
text/html |
rawmimename |
string |
The file's MIME name. |
A valid MIME name. |
text-html |
absdir |
string |
The absolute path to the directory. |
A valid directory, relative to the account's /homedirectory. |
home/user/public_html |
type |
string |
The type of the item. |
|
file |
gid |
integer |
The file owner's system group ID. |
A valid group ID. |
508 |
reason |
string |
A reason for failure. Note: This function only returns a reason value if there was an error. |
A string that describes the error. |
This is an error message. |
result |
Boolean |
Whether the function succeeded. |
|
1 |