Пример #1
0
 function getNode()
 {
     return Node::createFromStat($this->path, fstat($this->handle));
 }
Пример #2
0
 protected function createNode($path, $mode, $args = [])
 {
     $args['inode'] = crc32(uniqid('', true));
     $args = array_merge([$path, $mode], $args);
     $node = Node::construct($args);
     $node->atime = $node->mtime = $node->ctime = time();
     return $node;
 }
Пример #3
0
 public function getNode($path)
 {
     $fullPath = $this->getFullPath($path);
     clearstatcache();
     if (file_exists($fullPath)) {
         $stat = stat($fullPath);
         return Node::createFromStat($path, $stat);
     }
 }
Пример #4
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;
     }
 }