Description
This function retrieves data from a non-volatile datastore. Files are located in the /home/user/.cpanel/nvdata
directory, where user
represents the account name.
Warning:
We strongly recommend that you use the following UAPI function instead of this function:
-
NVData::get
— This function retrieves an environment variable's value.
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 |
names |
string |
Required The NVData file's name.
|
A valid file name. Note: To retrieve multiple files, separate the file names with a pipe (|) character. |
mymind |
Returns
Parameter |
Type |
Description |
Possible values |
Example |
value |
string |
The NVData file name. |
A valid file name. |
you |
name |
string |
The value in the NVData file. |
A valid file name. |
mymind |
reason |
string |
A reason for failure. Note: This function only returns a reason value if it failed. |
A string that describes the error. |
This is an error message. |
result |
boolean |
Whether the function succeeded. |
|
1 |