public static function send_file(
		string $fpath, $disposition=null, int $code=200, int $cache=0,
		array $headers=[], bool $xsendfile=null,
		callable $callback_notfound=null
	) {

		if (!file_exists($fpath) || is_dir($fpath)) {
			static::start_header(404, 0, $headers);
			if (is_callable($callback_notfound)) {
				$callback_notfound();
				static::halt();
			}
			return;
		}

		static::start_header($code, $cache, $headers);

		static::header('Content-Length: ' .
			filesize($fpath));
		static::header("Content-Type: " .
			Common::get_mimetype($fpath));

		if ($disposition) {
			if ($disposition === true)
				$disposition = htmlspecialchars(
					basename($fpath), ENT_QUOTES);
			static::header(sprintf(
				'Content-Disposition: attachment; filename="%s"',
				$disposition));
		}

		if (!$xsendfile)
			readfile($fpath);

		static::halt();
	}