예제 #1
0
 protected function getFiles()
 {
     if ($this->files === null) {
         $this->prepareFilters();
         $this->files = array();
         $fs = $this->pathname->rootAdapter()->getFilesystem();
         $fileNames = $this->pathname->localAdapter()->ls($this->pathname);
         foreach ($fileNames as $fileName) {
             $childPathname = $this->pathname->child($fileName);
             $file = $fs->getFile($childPathname);
             if ($this->applyBitmaskFilters($file) && $this->applyGlobFilters($file) && $this->applyCallableFilters($file)) {
                 $this->files[] = $file;
             }
         }
         $this->keys = array_keys($this->files);
     }
     return $this->files;
 }
예제 #2
0
파일: File.php 프로젝트: filicious/core
 /**
  * Get an iterator for this directory.
  *
  * @param int|string|\Closure|callable $filter Variable list of filters.
  *                                             - Flags File::LIST_*
  *                                             - Glob pattern
  *                                             - Callables
  *
  * @return \Iterator
  *
  * @api
  */
 public function getIterator($filter = null, $_ = null)
 {
     return $this->pathname->rootAdapter()->getIterator($this->pathname, func_get_args());
 }
예제 #3
0
 /**
  * @return \Filicious\File
  */
 public function getFile()
 {
     return $this->pathname->rootAdapter()->getFilesystem()->getFile($this->pathname);
 }