file, $this->mode)); } /** @return resource */ function getResource() { if ($this->fd === null && $this->file !== null) $this->fd = $this->open(); return parent::getResource(); } /** streamer le contenu du fichier en sortie */ function readfile(?string $contentType=null, ?string $charset=null, ?string $filename=null, string $disposition=null): bool { if ($contentType !== null) http::content_type($contentType, $charset); if ($filename !== null) http::download_as($filename, $disposition); return readfile($this->file) !== false; } }