files

package
v0.0.0-...-2c3d6b8 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2023 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChmodRevertFunc

type ChmodRevertFunc func(filename string) (os.FileMode, error)

type File

type File interface {
	io.Reader
	io.Writer
	io.Closer
	Name() string
}

type FileOperator

type FileOperator interface {
	Copy(src, dest string) error
	DeleteMatching(filename string) error
	Open(filename string) (File, error)
	Chmod(filename string, permission int) (ChmodRevertFunc, error)
}

func NewOperator

func NewOperator(ctx context.Context) FileOperator

type Operator

type Operator struct {
	// contains filtered or unexported fields
}

func (*Operator) Chmod

func (o *Operator) Chmod(filename string, permission int) (ChmodRevertFunc, error)

func (*Operator) Copy

func (o *Operator) Copy(src, dest string) error

func (*Operator) DeleteMatching

func (o *Operator) DeleteMatching(filename string) error

func (*Operator) Open

func (o *Operator) Open(filename string) (File, error)

Jump to

Keyboard shortcuts

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