Description

This function reports the first file's URI, relative to the cPanel base directory.

Examples 


https://hostname.example.com:2083/cpsess##########/execute/Parser/firstfile_relative_uri

$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
 
// Return the first file relative to the account's base directory.
$get_file = $cpanel->uapi(
    'Parser', 'firstfile_relative_uri'
);

 

my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
 
# Return the first file relative to the account's base directory.
my $get_file = $cpliveapi->uapi(
    'parser', 'firstfile_relative_uri',
);

 

<!-- Retrieve the first relative file. -->
[% data = execute( 'Parser', 'firstfile_relative_uri' ); %]

 

uapi --user=username Parser firstfile_relative_uri

{
  "messages": null,
  "errors": null,
  "status": 1,
  "data": {
    "uri": "/usr/local/cpanel/base/favicon.ico"
  }
}

   

Parameters

This function does not accept parameters.

Returns

ReturnTypeDescriptionPossible valuesExample
uristring

The file's URI.

An absolute file path.

/usr/local/cpanel/base/favicon.ico