Exemplo n.º 1
0
 /**
  * @param $fromDir
  * @param $toDir
  * @param bool|false $override
  */
 public function publishDir($fromDir, $toDir, $override = false)
 {
     $files = $this->finder->findAll(1, $fromDir)->getFiles();
     $toDir = Directory::isAbsPath($toDir) ? $toDir : $this->publishPath . '/' . $toDir;
     // publish files ...
     foreach ($files as $file) {
         $this->publishFile($fromDir . '/' . $file, $toDir . '/' . $file, $override);
     }
 }
Exemplo n.º 2
0
 /**
  * @param $dir
  * @param array $options more {@see \inhere\librarys\files\DirectoryFiles}
  * @param bool|false $recursive
  *
  * @return array|\ArrayObject
  */
 public static function findFiles($dir, array $options = [], $recursive = false)
 {
     $df = new FileFinder($options);
     return $df->findAll($recursive, $dir)->getFiles();
 }