feat: add root prefix before operate
This commit is contained in:
@ -25,3 +25,15 @@ type Items struct {
|
||||
Main []Item `json:"main"`
|
||||
Additional []Item `json:"additional"`
|
||||
}
|
||||
|
||||
type IRootFolderPath interface {
|
||||
GetRootFolder() string
|
||||
}
|
||||
|
||||
type RootFolderPath struct {
|
||||
RootFolder string `json:"root_folder" help:"root folder path" default:"/"`
|
||||
}
|
||||
|
||||
func (r RootFolderPath) GetRootFolder() string {
|
||||
return r.RootFolder
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ type Other interface {
|
||||
}
|
||||
|
||||
type Reader interface {
|
||||
File(ctx context.Context, path string) (FileInfo, error)
|
||||
Get(ctx context.Context, path string) (FileInfo, error)
|
||||
List(ctx context.Context, path string) ([]FileInfo, error)
|
||||
Link(ctx context.Context, args LinkArgs) (*Link, error)
|
||||
}
|
||||
|
Reference in New Issue
Block a user