deleteFile(runtime_path() . $filePath); } /** * 删除指定路径的文件 * * @param string $filePath 文件路径 * * @return bool 返回删除结果 */ public function deleteFile(string $filePath): bool { if (file_exists($filePath)) { return unlink($filePath); } return false; } }