public function getDir() { return $this->isDir() ? $this->getRealPath() : dirname($this->getRealPath()); }