public function getTreeInPath($path = null) { if (is_null($path)) { $path = $this->repo->getPath(); } $tree = $this->getTree(); if ($path) { $tree = array_filter($tree, function ($item) use($path) { return 0 === strpos($item['path'], $path); }); } return $tree; }