utils

package
v0.0.0-...-c94949e Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: BSD-3-Clause Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FS

type FS interface {
	Put(*ReceiverFile) (int64, error)
	Skip(*ReceiverFile) bool
	List(string) ([]os.FileInfo, error)
	Read(*SenderFile) (os.FileInfo, io.ReaderAt, error)
}

File System: need to handle all type of files: regular, folder, symlink, etc

type ReceiverFile

type ReceiverFile struct {
	Name       string
	Length     int64
	ModTime    time.Time
	Mode       int32
	Uid        int32
	Gid        int32
	LinkTarget string
	Rdev       int32
	Buf        *bytes.Buffer
}

func (*ReceiverFile) FileMode

func (f *ReceiverFile) FileMode() fs.FileMode

FileMode converts from the Linux permission bits to Go’s permission bits.

type SenderFile

type SenderFile struct {
	// TODO: store relative to the root to conserve RAM
	Path    string
	WPath   string
	Regular bool
}

Jump to

Keyboard shortcuts

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