public function getFolderPath() { if ($this->getIsFolder()) { return $this->p; } return substr($this->p, 0, strrpos($this->p, '/') + 1); }