/** * Returns the current working directory * * @return Directory Current directory */ public function getCwd() { $path = $this->wrapper->pwd(); if ('/' === $path) { return new Directory('/'); } return $this->findDirectoryByName($path); }