feat: store search file index

This commit is contained in:
Xhofe
2022-04-08 21:51:21 +08:00
parent 58568d4ef6
commit 6591af58ea
17 changed files with 304 additions and 145 deletions

View File

@ -2,6 +2,7 @@ package model
import (
"github.com/Xhofe/alist/conf"
"github.com/Xhofe/alist/utils"
"sort"
"strings"
"time"
@ -84,3 +85,7 @@ func (f File) ModTime() time.Time {
func (f File) IsDir() bool {
return f.Type == conf.FOLDER
}
func (f File) GetType() int {
return utils.GetFileType(utils.Ext(f.GetName()))
}