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; }
public function nativeMove(Pathname $srcPathname, Pathname $dstPathname) { if ($srcPathname->localAdapter() == $dstPathname->localAdapter()) { return $this->getConnection()->rename($srcPathname->localAdapter()->getBasepath() . $srcPathname->local(), $dstPathname->localAdapter()->getBasepath() . $dstPathname->local()); } return false; }