path = $path; $this->filename = basename($path); $this->relativePath = substr($path, strlen($absolutePart)); } public function isPresent(): bool { return is_file($this->path); } public function getMimeType(): string { return mime_content_type($this->path); } public function getPublicPath(): string { return $this->relativePath; } public function getFileName(): string { return $this->filename; } }