smb

package
v0.0.0-...-f856fe1 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2025 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(opt *Option) (driver.FS, error)

Types

type Option

type Option struct {
	base.Option
	Host      string `json:"host"       validate:"required"`
	Port      int    `json:"port"`
	Username  string `json:"username"   validate:"required"`
	Password  string `json:"password"   validate:"required"`
	Domain    string `json:"domain"`
	ShareName string `json:"share_name" validate:"required"`
}

func (*Option) NewFS

func (opt *Option) NewFS() (driver.FS, error)

type SMB

type SMB struct {
	driver.Base
	// contains filtered or unexported fields
}

func (*SMB) Close

func (d *SMB) Close() error

func (*SMB) Copy

func (d *SMB) Copy(ctx context.Context, src, dst string) error

func (*SMB) Create

func (d *SMB) Create(path string) (driver.FileWriter, error)

func (*SMB) Get

func (d *SMB) Get(ctx context.Context, path string) (driver.File, error)

func (*SMB) List

func (d *SMB) List(ctx context.Context, path string, metas ...driver.Meta) ([]driver.File, error)

func (*SMB) MakeDir

func (d *SMB) MakeDir(ctx context.Context, path string) error

func (*SMB) Move

func (d *SMB) Move(ctx context.Context, src, dst string) error

func (*SMB) Open

func (d *SMB) Open(path string) (driver.FileReader, error)

func (*SMB) Remove

func (d *SMB) Remove(ctx context.Context, path string) error

func (*SMB) Rename

func (d *SMB) Rename(ctx context.Context, path, newName string) error

Jump to

Keyboard shortcuts

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