refactor: 全窗口统一 Avalonia,移除 Flutter/Dart,新增 Java 实现
- 恢复同代 GC Avalonia 主界面(主页/下载/设置/关于)替换 Flutter - 模型窗口统一 Avalonia;HTML 课件用 WebView.Avalonia 内嵌渲染 - 新增 CoursewareServer(回环 HTTP + Range)与 CoursewareWindow - 彻底移除 Flutter/Dart 前端及构建脚本相关逻辑 - 新增 ./build.sh run 开发运行命令 - 项目源码整理到 C#/ 子目录,新增 Java/ 实现 - 工作日志随项目迁移
This commit is contained in:
1 parent
3f1f48f54c
commit
cf05e886ac
405 files changed
+18226
-19263
No files matched your search
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace GC.Services;
|
||||
|
||||
/// <summary>
|
||||
/// 安全解压的统一入口(实现在 <see cref="SafeArchive"/>)。
|
||||
/// 保留这个名字是因为模型源导入 / 启动器更新两处都在用,
|
||||
/// 真正的校验逻辑集中在一处,避免两套实现走偏。
|
||||
/// </summary>
|
||||
public static class ZipSafety
|
||||
{
|
||||
public static void ExtractToDirectory(string zipPath, string destination)
|
||||
{
|
||||
if (!File.Exists(zipPath))
|
||||
throw new FileNotFoundException("压缩包不存在", zipPath);
|
||||
SafeArchive.ExtractToDirectory(zipPath, destination);
|
||||
}
|
||||
|
||||
/// <summary>只检查不落盘:给下载完成后的预检用。</summary>
|
||||
public static SafeArchive.Inspection Inspect(string zipPath) => SafeArchive.Inspect(zipPath);
|
||||
}
|
||||
Reference in new issue
Block a user