2022-06-07 10:13:55 +00:00
|
|
|
package local
|
|
|
|
|
2022-06-09 09:11:46 +00:00
|
|
|
import (
|
|
|
|
"github.com/alist-org/alist/v3/internal/driver"
|
2022-08-31 13:01:15 +00:00
|
|
|
"github.com/alist-org/alist/v3/internal/op"
|
2022-06-09 09:11:46 +00:00
|
|
|
)
|
2022-06-07 10:13:55 +00:00
|
|
|
|
|
|
|
type Addition struct {
|
2022-09-04 05:07:53 +00:00
|
|
|
driver.RootPath
|
2022-08-11 12:32:17 +00:00
|
|
|
Thumbnail bool `json:"thumbnail" required:"true" help:"enable thumbnail"`
|
2022-06-07 10:13:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
var config = driver.Config{
|
2022-09-01 14:13:37 +00:00
|
|
|
Name: "Local",
|
2022-07-19 09:07:12 +00:00
|
|
|
OnlyLocal: true,
|
|
|
|
LocalSort: true,
|
|
|
|
NoCache: true,
|
|
|
|
DefaultRoot: "/",
|
2022-06-07 10:13:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func New() driver.Driver {
|
2022-07-19 09:11:53 +00:00
|
|
|
return &Local{}
|
2022-06-07 10:13:55 +00:00
|
|
|
}
|
2022-06-07 14:02:41 +00:00
|
|
|
|
|
|
|
func init() {
|
2022-08-31 13:01:15 +00:00
|
|
|
op.RegisterDriver(config, New)
|
2022-06-07 14:02:41 +00:00
|
|
|
}
|