You are here

function FMDiskFileSystem::copyDir in N1ED - Visual editor as CKEditor plugin with Bootstrap support 7

Overrides IFMDiskFileSystem::copyDir

File

vendor/edsdk/flmngr-server-php/src/fs/FMDiskFileSystem.php, line 452

Class

FMDiskFileSystem

Namespace

EdSDK\FlmngrServer\fs

Code

function copyDir($dirPath, $newPath) {
  $fullPathSrc = $this
    ->getAbsolutePath($dirPath);
  $index = strrpos($fullPathSrc, "/");
  $name = $index === FALSE ? $fullPathSrc : substr($fullPathSrc, $index + 1);
  $fullPathDst = $this
    ->getAbsolutePath($newPath) . "/" . $name;
  $res = $this
    ->copyDir__recurse($fullPathSrc, $fullPathDst);
  if ($res === FALSE) {
    throw new MessageException(FMMessage::createMessage(FMMessage::FM_ERROR_ON_MOVING_FILES));
  }
}