Documentation
¶
Index ¶
- func AddBooksToStore(books []*model.Book) error
- func InitAllStore(cfg ConfigInterface) error
- func InitConfig(c ConfigInterface)
- func InitStore(storePath string, cfg ConfigInterface) error
- func IsSkipDir(path string) bool
- func IsSupportFile(checkPath string) bool
- func IsSupportMedia(checkPath string) bool
- func SetCurrentFS(fs vfs.FileSystem)
- type ConfigInterface
- type DirNode
- type ScanFailureRecord
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitConfig ¶
func InitConfig(c ConfigInterface)
func InitStore ¶
func InitStore(storePath string, cfg ConfigInterface) error
InitStore 扫描书库路径,取得路径里的书籍 支持本地路径和远程 URL(WebDAV 等)
func SetCurrentFS ¶ added in v1.2.17
func SetCurrentFS(fs vfs.FileSystem)
SetCurrentFS 设置当前扫描使用的文件系统
Types ¶
type ConfigInterface ¶
type DirNode ¶
type DirNode struct {
Name string `json:"name"`
Path string `json:"path"`
SubDirs []DirNode `json:"sub_dirs"` // 子目录列表
Files []model.PageInfo `json:"files"` // 本目录下的图片文件列表
}
DirNode 表示目录树节点,用于表示文件系统中的目录结构。
func HandleDirectory ¶
HandleDirectory 扫描本地目录的核心函数:递归遍历目录,忽略指定名称的文件夹,收集图片文件信息
type ScanFailureRecord ¶ added in v1.2.28
type ScanFailureRecord = model.ScanFailureRecord
ScanFailureRecord 与数据库共用扫描失败记录结构。
Click to show internal directories.
Click to hide internal directories.