public function getType() { if (is_file($this->path)) { return 'file'; } elseif (is_link($this->path)) { return 'link'; } elseif (is_dir($this->path)) { return 'dir'; } return "Unknown"; }