Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( RootPath = filepath.Join(ObtainRootPath(), "defsdata") // 二级目录 Files = filepath.Join(RootPath, "files") // 文件目录 DB = filepath.Join(RootPath, "db") // 数据库目录 Logs = filepath.Join(RootPath, "logs") // 日志目录 // 三级目录 UploadPath = filepath.Join(Files, "uploads") // 上传目录 SlicePath = filepath.Join(Files, "slices") // 切片目录 DownloadPath = filepath.Join(Files, "downloads") // 下载目录 BusinessDbPath = filepath.Join(DB, "businessdbs") // 业务db目录 )
路径管理器 TODO: 待优化
Functions ¶
func DefaultDownloadPath ¶
func DefaultDownloadPath() string
GetDefaultDownloadPath 返回操作系统的默认下载路径。 它假设用户使用的是操作系统的标准下载文件夹。
func DirExistsAndMkdirAll ¶
检查路径是否存在并且是一个目录 不存在则创建目录路径和所有尚不存在的父级。
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.