You are here

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

1 call to FMDiskFileSystem::copyDir__recurse()
FMDiskFileSystem::copyDir in vendor/edsdk/flmngr-server-php/src/fs/FMDiskFileSystem.php

File

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

Class

FMDiskFileSystem

Namespace

EdSDK\FlmngrServer\fs

Code

private function copyDir__recurse($src, $dst) {
  $dir = opendir($src);
  mkdir($dst);
  while (FALSE !== ($file = readdir($dir))) {
    if ($file != '.' && $file != '..') {
      if (is_dir($src . '/' . $file)) {
        $res = $this
          ->copyDir__recurse($src . '/' . $file, $dst . '/' . $file);
        if ($res === FALSE) {
          return FALSE;
        }
      }
      else {
        $res = copy($src . '/' . $file, $dst . '/' . $file);
        if ($res === FALSE) {
          return FALSE;
        }
      }
    }
  }
  closedir($dir);
  return TRUE;
}