protected static function DataProviderFileTest::moveUploadedFile in RESTful 7.2
Helper function that moves an uploaded file.
Parameters
string $filename: The path of the file to move.
string $uri: The path where to move the file.
Return value
bool TRUE if the file was moved. FALSE otherwise.
Overrides DataProviderFile::moveUploadedFile
File
- tests/
modules/ restful_test/ src/ Plugin/ resource/ DataProvider/ DataProviderFileTest.php, line 38 - Contains \Drupal\restful_test\Plugin\resource\DataProvider\DataProviderFileTest.
Class
Namespace
Drupal\restful_test\Plugin\resource\DataProviderCode
protected static function moveUploadedFile($filename, $uri) {
if (drupal_move_uploaded_file($filename, $uri)) {
return TRUE;
}
return variable_get('restful_insecure_uploaded_flag', FALSE) && (bool) file_unmanaged_move($filename, $uri);
}