/** * @return string File name */ public function getName() { $path = $this->getPath(); if ($this->isFolder()) { if (driverTools::str_end("/", $path)) { $path = substr($path, 0, strlen($path) - 1); } } $fInfo = driverTools::pathInfo($path); return $fInfo['filename']; }