feat: improve driver

This commit is contained in:
Noah Hsu
2022-06-07 22:02:41 +08:00
parent 0d93a6aa41
commit 677047c80b
9 changed files with 88 additions and 27 deletions

26
internal/model/file.go Normal file
View File

@ -0,0 +1,26 @@
package model
import "time"
type File struct {
Name string
Size uint64
Modified time.Time
IsFolder bool
}
func (f File) GetName() string {
return f.Name
}
func (f File) GetSize() uint64 {
return f.Size
}
func (f File) ModTime() time.Time {
return f.Modified
}
func (f File) IsDir() bool {
return f.IsFolder
}