public function isDir($path) { try { return $this->fs->getMetadata($path)['type'] === 'dir'; } catch (Error $ex) { } catch (Exception $ex) { } throw new ReadException("Path {$path} could not be determined to be directory or not.", $ex); }