Private
Public Access
1
0
Files
u-desk/internal/filesystem/service_interfaces.go
绝尘 b849e6cc46 新增:应用配置管理模块,优化文件系统功能
- 新增 ConfigAPI 和 ConfigService 实现配置管理
- 新增 SettingsPanel 和 UpdateNotification 组件
- 文件系统模块化重构,提升代码质量
- 提取公共函数,优化代码结构
- 版本号更新至 0.2.0
2026-01-28 23:38:23 +08:00

31 lines
702 B
Go
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package filesystem
import (
"context"
)
// FileService 文件操作核心接口
// 定义所有文件操作的基本功能便于mock测试
type FileService interface {
// 基本操作
Read(path string) (string, error)
Write(path, content string) error
Delete(path string) error
List(path string) ([]map[string]interface{}, error)
CreateDir(path string) error
CreateFile(path string) error
GetInfo(path string) (map[string]interface{}, error)
Open(path string) error
// 快捷方式
ResolveShortcut(lnkPath string) (targetPath string, err error)
// 配置
GetConfig() *Config
Close(ctx context.Context) error
}
// 确保实现接口
var _ FileService = (*FileSystemService)(nil)