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 directory to query. |
Any valid directory name. |
public_html |
|
files |
Boolean |
Required The files to query. |
One or more valid file names. Note: Separate multiple files with the pipe character (|). |
file.html|file2.html|file3.php |
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 |
|
absolutepath |
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 username. |
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 notinclude the file or directory name. |
/home/example/public_html |
|
mimeinfo |
string |
The file's MIME type. |
Any valid MIME type. |
text/html |
|
rawmimename |
string |
The file's MIME name. |
Any valid MIME name. |
text-html |
|
absdir |
string |
The directory's absolute path. |
A valid directory, relative to the account's /homedirectory. |
home/user/public_html |
|
type |
string |
The item type. |
|
file |
|
gid |
integer |
The file owner's system group ID. |
A valid group ID number. |
508 |
|
reason |
string |
A reason for failure. Note: This function only returns a reasonvalue if an error occurred. |
A string that describes the error. |
This is an error message. |
|
result |
Boolean |
Whether the function succeeded. |
|
1 |
