mirror of
https://github.com/LHY0125/PathEditor.git
synced 2026-05-10 02:09:46 +08:00
feat(导入导出): 支持同时导出和导入系统与用户PATH变量
- 重构导出功能,将系统变量和用户变量合并到单个JSON文件中 - 重构导入功能,支持解析包含系统变量和用户变量的JSON文件 - 在导入时提供选项让用户选择导入目标(系统变量、用户变量或全部) - 更新UI交互逻辑,适配新的导入导出数据结构 - 改进JSON文件格式,包含版本信息和导出时间戳
This commit is contained in:
@@ -5,10 +5,15 @@
|
||||
|
||||
#define EXPORT_VERSION "1.0"
|
||||
|
||||
// 导出 PATH 到文件
|
||||
int export_paths_to_file(const StringList *list, const char *filepath, int is_system);
|
||||
typedef struct {
|
||||
StringList system;
|
||||
StringList user;
|
||||
} ExportData;
|
||||
|
||||
// 从文件导入 PATH
|
||||
int import_paths_from_file(const char *filepath, StringList *list);
|
||||
// 导出 PATH 到文件
|
||||
int export_paths_to_file(const ExportData *data, const char *filepath);
|
||||
|
||||
// 从文件导入 PATH (返回是否包含全部格式)
|
||||
int import_paths_from_file(const char *filepath, ExportData *data);
|
||||
|
||||
#endif // IMPORT_EXPORT_H
|
||||
Reference in New Issue
Block a user