Пример #1
0
 public function getNode($path)
 {
     $fullPath = $this->getFullPath($path);
     clearstatcache();
     if (file_exists($fullPath)) {
         $stat = stat($fullPath);
         return Node::createFromStat($path, $stat);
     }
 }
Пример #2
0
 function getNode()
 {
     return Node::createFromStat($this->path, fstat($this->handle));
 }
Пример #3
0
 function getNode($path)
 {
     clearstatcache();
     $type = filetype("{$this->basePath}/{$path}");
     if ($type == 'dir') {
         $type = Node::DIR;
     } elseif ($type == 'file') {
         $type = Node::FILE;
     } else {
         $type = null;
     }
     if ($type) {
         $node = Node::createFromStat($path, stat("{$this->basePath}/{$path}"));
         return $node;
     }
 }