mirror of
https://github.com/HChaZZY/alist.git
synced 2025-12-21 01:27:25 +08:00
🎇 多盘支持
This commit is contained in:
@@ -24,8 +24,8 @@ func (file *File) Create() error {
|
||||
return conf.DB.Create(file).Error
|
||||
}
|
||||
|
||||
func Clear() error {
|
||||
return conf.DB.Where("1 = 1").Delete(&File{}).Error
|
||||
func Clear(drive *conf.Drive) error {
|
||||
return conf.DB.Where("dir like ?", fmt.Sprintf("%s%%", drive.Name)).Delete(&File{}).Error
|
||||
}
|
||||
|
||||
func GetFileByDirAndName(dir, name string) (*File, error) {
|
||||
|
||||
Reference in New Issue
Block a user