smb

package
v3.34.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 2, 2024 License: AGPL-3.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Addition

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"`
}

type SMB

type SMB struct {
	model.Storage
	Addition
	// contains filtered or unexported fields
}

func (*SMB) Config

func (d *SMB) Config() driver.Config

func (*SMB) Copy

func (d *SMB) Copy(ctx context.Context, srcObj, dstDir model.Obj) error

func (*SMB) CopyDir

func (d *SMB) CopyDir(src string, dst string) error

CopyDir Dir copies a whole directory recursively

func (*SMB) CopyFile

func (d *SMB) CopyFile(src, dst string) error

CopyFile File copies a single file from src to dst

func (*SMB) CreateNestedFile

func (d *SMB) CreateNestedFile(path string) (*smb2.File, error)

CreateNestedFile create nested file

func (*SMB) Drop

func (d *SMB) Drop(ctx context.Context) error

func (*SMB) Exists

func (d *SMB) Exists(name string) bool

Exists determine whether the file exists

func (*SMB) GetAddition

func (d *SMB) GetAddition() driver.Additional

func (*SMB) Init

func (d *SMB) Init(ctx context.Context) error
func (d *SMB) Link(ctx context.Context, file model.Obj, args model.LinkArgs) (*model.Link, error)

func (*SMB) List

func (d *SMB) List(ctx context.Context, dir model.Obj, args model.ListArgs) ([]model.Obj, error)

func (*SMB) MakeDir

func (d *SMB) MakeDir(ctx context.Context, parentDir model.Obj, dirName string) error

func (*SMB) Move

func (d *SMB) Move(ctx context.Context, srcObj, dstDir model.Obj) error

func (*SMB) Put

func (d *SMB) Put(ctx context.Context, dstDir model.Obj, stream model.FileStreamer, up driver.UpdateProgress) error

func (*SMB) Remove

func (d *SMB) Remove(ctx context.Context, obj model.Obj) error

func (*SMB) Rename

func (d *SMB) Rename(ctx context.Context, srcObj model.Obj, newName string) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL