public function FileApi::renameFile in TMGMT Translator Smartling 8.3
Same name and namespace in other branches
- 8.4 vendor/smartling/api-sdk-php/src/File/FileApi.php \Smartling\File\FileApi::renameFile()
- 8.2 api-sdk-php/src/File/FileApi.php \Smartling\File\FileApi::renameFile()
- 8.2 vendor/smartling/api-sdk-php/src/File/FileApi.php \Smartling\File\FileApi::renameFile()
Renames an uploaded file by changing the fileUri.
After renaming the file, the file will only be identified by the new fileUri you provide.
Parameters
string $fileUri: Current value that uniquely identifies the file.
string $newFileUri: The new value for fileUri. We recommend that you use file path + file name, similar to how version control systems identify the file.
ParameterInterface $params:
Return value
string Just empty string if everything was successfully. Just empty string if everything was successfully.
Throws
See also
http://docs.smartling.com/pages/API/FileAPI/Rename/
File
- vendor/
smartling/ api-sdk-php/ src/ File/ FileApi.php, line 277
Class
- FileApi
- Class FileApi
Namespace
Smartling\FileCode
public function renameFile($fileUri, $newFileUri, ParameterInterface $params = null) {
$params = is_null($params) ? [] : $params
->exportToArray();
$params['fileUri'] = $fileUri;
$params['newFileUri'] = $newFileUri;
$requestData = $this
->getDefaultRequestData('form_params', $params);
return $this
->sendRequest('file/rename', $requestData, self::HTTP_METHOD_POST);
}