Documentation
¶
Index ¶
- func StringifyTree(node *Node) string
- type Addition
- type Node
- type Urls
- func (d *Urls) Config() driver.Config
- func (d *Urls) Copy(ctx context.Context, srcObj, dstDir model.Obj) (model.Obj, error)
- func (d *Urls) Drop(ctx context.Context) error
- func (d *Urls) Get(ctx context.Context, path string) (model.Obj, error)
- func (d *Urls) GetAddition() driver.Additional
- func (d *Urls) Init(ctx context.Context) error
- func (d *Urls) Link(ctx context.Context, file model.Obj, args model.LinkArgs) (*model.Link, error)
- func (d *Urls) List(ctx context.Context, dir model.Obj, args model.ListArgs) ([]model.Obj, error)
- func (d *Urls) MakeDir(ctx context.Context, parentDir model.Obj, dirName string) (model.Obj, error)
- func (d *Urls) Move(ctx context.Context, srcObj, dstDir model.Obj) (model.Obj, error)
- func (d *Urls) Put(ctx context.Context, dstDir model.Obj, stream model.FileStreamer, ...) error
- func (d *Urls) PutURL(ctx context.Context, dstDir model.Obj, name, url string) (model.Obj, error)
- func (d *Urls) Remove(ctx context.Context, obj model.Obj) error
- func (d *Urls) Rename(ctx context.Context, srcObj model.Obj, newName string) (model.Obj, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StringifyTree ¶ added in v3.42.0
Types ¶
type Addition ¶
type Addition struct { // Usually one of two // driver.RootPath // driver.RootID // define other UrlStructure string `` /* 394-byte string literal not displayed */ HeadSize bool `json:"head_size" type:"bool" default:"false" help:"Use head method to get file size, but it may be failed."` Writable bool `json:"writable" type:"bool" default:"false"` }
type Node ¶
Node is a node in the folder tree
func BuildTree ¶
build tree from text, text structure definition: *
- FolderName:
- [FileName:][FileSize:][Modified:]Url
*
- For example:
- folder1:
- name1:url1
- url2
- folder2:
- url3
- url4
- url5
- folder3:
- url6
- url7
- url8
if there are no name, use the last segment of url as name
func GetNodeFromRootByPath ¶
type Urls ¶
func (*Urls) GetAddition ¶
func (d *Urls) GetAddition() driver.Additional
func (*Urls) Put ¶ added in v3.42.0
func (d *Urls) Put(ctx context.Context, dstDir model.Obj, stream model.FileStreamer, up driver.UpdateProgress) error
Click to show internal directories.
Click to hide internal directories.