You are here

private static function FlmngrServer::reqFileRename in N1ED - Visual editor as CKEditor plugin with Bootstrap support 7

1 call to FlmngrServer::reqFileRename()
FlmngrServer::flmngrRequest in vendor/edsdk/flmngr-server-php/src/FlmngrServer.php

File

vendor/edsdk/flmngr-server-php/src/FlmngrServer.php, line 297

Class

FlmngrServer

Namespace

EdSDK\FlmngrServer

Code

private static function reqFileRename($config) {
  $filePath = $_POST['f'];
  $newName = $_POST['n'];
  try {
    $fileSystem = new FMDiskFileSystem($config);
    $fileSystem
      ->renameFile($filePath, $newName);
    return new Response(NULL, TRUE);
  } catch (MessageException $e) {
    return new Response($e
      ->getFailMessage(), NULL);
  }
}