Description
This function returns a file's path.
Warning:
We strongly recommend that you use the following UAPI functions instead of this function:
-
Branding::file
— This function retrieves a branding file's path.
Note:
cPanel API 2's Branding
module only modifies data for the x3 theme.
Examples
Note:
Use cPanel's API Shell interface (Home >> Advanced >> API Shell) to directly test cPanel API calls.
Parameters
Input |
Type |
Description |
Possible values |
Example |
file |
string |
Required The file. |
A valid filename.
|
file.ext |
brandingpkg |
string |
A branding package name, to only search that package's files. If you do not use this parameter, the function searches all packages. |
A valid branding package name. |
mybrandingpkg |
skipdefault |
boolean |
Whether to ignore the theme default. This parameter defaults to 0. |
|
0 |
checkmain |
boolean |
Whether to search the main branding directory. This parameter defaults to 0. |
|
0 |
Returns
Return |
Type |
Description |
Possible values |
Example |
file |
string |
The file's name. |
The file input parameter's value. |
file.ext |
path |
string |
The path to the file. |
The path to the file, relative to the user's home directory. |
/usr/local/cpanel/base/frontend/x3/branding/file.ext |
exists |
boolean |
Whether the file exists. |
|
1 |
result |
boolean |
Whether the function succeeded. |
|
1 |