You are here

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

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

File

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

Class

FlmngrServer

Namespace

EdSDK\FlmngrServer

Code

private static function reqFileCopy($config) {
  $files = $_POST['fs'];
  $newPath = $_POST['n'];
  $filesPaths = preg_split("/\\|/", $files);
  try {
    $fileSystem = new FMDiskFileSystem($config);
    $fileSystem
      ->copyFiles($filesPaths, $newPath);
    return new Response(NULL, TRUE);
  } catch (MessageException $e) {
    return new Response($e
      ->getFailMessage(), NULL);
  }
}