protected function moveTemporaryFileToFinalDestination($temporaryFile, $finalTargetPathAndFilename)
    {
        if (!file_exists(dirname($finalTargetPathAndFilename))) {
            Files::createDirectoryRecursively(dirname($finalTargetPathAndFilename));
        }
        if (copy($temporaryFile, $finalTargetPathAndFilename) === false) {
            throw new StorageException(sprintf('The temporary file of the file import could not be moved to the final target "%s".', $finalTargetPathAndFilename), 1381156103);
        }
        unlink($temporaryFile);

        $this->fixFilePermissions($finalTargetPathAndFilename);
    }
protected function moveTemporaryFileToFinalDestination($temporaryFile, $finalTargetPathAndFilename)
    {
        if (!file_exists(dirname($finalTargetPathAndFilename))) {
            Files::createDirectoryRecursively(dirname($finalTargetPathAndFilename));
        }
        if (copy($temporaryFile, $finalTargetPathAndFilename) === false) {
            throw new StorageException(sprintf('The temporary file of the file import could not be moved to the final target "%s".', $finalTargetPathAndFilename), 1381156103);
        }
        unlink($temporaryFile);

        $this->fixFilePermissions($finalTargetPathAndFilename);
    }
protected function moveTemporaryFileToFinalDestination ( $ temporaryFile , $ finalTargetPathAndFilename ) { if ( ! file_exists ( dirname ( $ finalTargetPathAndFilename ) ) ) { Files :: createDirectoryRecursively ( dirname ( $ finalTargetPathAndFilename ) ) ; } if ( copy ( $ temporaryFile , $ finalTargetPathAndFilename ) === false ) { throw new StorageException ( sprintf ( 'The temporary file of the file import could not be moved to the final target "%s".' , $ finalTargetPathAndFilename ) , 1381156103 ) ; } unlink ( $ temporaryFile ) ; $ this -> fixFilePermissions ( $ finalTargetPathAndFilename ) ; }
Move a temporary file to the final destination, creating missing path segments on the way.

@param string $temporaryFile
@param string $finalTargetPathAndFilename
@return void
@throws StorageException
Move a temporary file to the final destination creating missing path segments on the way .