function getNode() { return Node::createFromStat($this->path, fstat($this->handle)); }
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; }
public function getNode($path) { $fullPath = $this->getFullPath($path); clearstatcache(); if (file_exists($fullPath)) { $stat = stat($fullPath); return Node::createFromStat($path, $stat); } }
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; } }