* feat: add smb driver (close #1746) * Update driver.go
This commit is contained in:
28
drivers/smb/meta.go
Normal file
28
drivers/smb/meta.go
Normal file
@ -0,0 +1,28 @@
|
||||
package smb
|
||||
|
||||
import (
|
||||
"github.com/alist-org/alist/v3/internal/driver"
|
||||
"github.com/alist-org/alist/v3/internal/op"
|
||||
)
|
||||
|
||||
type Addition struct {
|
||||
driver.RootPath
|
||||
Address string `json:"address" required:"true"`
|
||||
Username string `json:"username" required:"true"`
|
||||
Password string `json:"password"`
|
||||
ShareName string `json:"share_name" required:"true"`
|
||||
}
|
||||
|
||||
var config = driver.Config{
|
||||
Name: "SMB",
|
||||
LocalSort: true,
|
||||
OnlyLocal: true,
|
||||
DefaultRoot: ".",
|
||||
NoCache: true,
|
||||
}
|
||||
|
||||
func init() {
|
||||
op.RegisterDriver(config, func() driver.Driver {
|
||||
return &SMB{}
|
||||
})
|
||||
}
|
Reference in New Issue
Block a user