function FMDiskFileSystem::moveDir in N1ED - Visual editor as CKEditor plugin with Bootstrap support 7
Overrides IFMDiskFileSystem::moveDir
File
- vendor/
edsdk/ flmngr-server-php/ src/ fs/ FMDiskFileSystem.php, line 439
Class
Namespace
EdSDK\FlmngrServer\fsCode
function moveDir($dirPath, $newPath) {
$fullPathSrc = $this
->getAbsolutePath($dirPath);
$index = strrpos($fullPathSrc, "/");
$name = $index === FALSE ? $fullPathSrc : substr($fullPathSrc, $index + 1);
$fullPathDst = $this
->getAbsolutePath($newPath) . "/" . $name;
$res = rename($fullPathSrc, $fullPathDst);
if ($res === FALSE) {
throw new MessageException(FMMessage::createMessage(FMMessage::FM_ERROR_ON_MOVING_FILES));
}
}