You are here

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

Overrides IFMDiskFileSystem::deleteFiles

File

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

Class

FMDiskFileSystem

Namespace

EdSDK\FlmngrServer\fs

Code

function deleteFiles($filesPaths) {
  for ($i = 0; $i < count($filesPaths); $i++) {
    $fullPath = $this
      ->getAbsolutePath($filesPaths[$i]);
    $res = is_dir($fullPath) ? rmdir($fullPath) : unlink($fullPath);
    if ($res === FALSE) {
      throw new MessageException(Message::createMessage(Message::UNABLE_TO_DELETE_FILE, $filesPaths[$i]));
    }
  }
}