local

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockDevice

type BlockDevice struct {
	Name          string
	Dev           uint32
	Major         uint32
	Minor         uint32
	SysDevicePath string
	ParentDev     uint32
}

type LocalFileService

type LocalFileService interface {
	CreateFile(path string, perm os.FileMode) error
	CreateDirectory(path string, perm os.FileMode) error
	CreateDirectories(path string, perm os.FileMode) error
	CreateSymlink(target, link string) error
	ListDirectory(path string) ([]os.FileInfo, error)
	IsExists(path string) (bool, error)
	IsFile(path string) (bool, error)
	IsDirectory(path string) (bool, error)
	IsSymbolicLink(path string) (bool, error)
	OpenFile(path string, truncate bool) (*os.File, error)
	OpenFileReadOnly(path string) (*os.File, error)
	WriteFile(path string, content []byte) error
	DeleteFile(path string) error
	DeleteDirectory(path string, recursively bool) error
	TruncateFile(path string, size int64) error
	RenameFile(src, dest string) error
	Chown(path string, uid, gid int) error
	Lchown(path string, uid, gid int) error
	Stat(path string) (os.FileInfo, error)
	Lstat(path string) (os.FileInfo, error)
	GetDiskUsage(path string) (uint64, error)
	GetDiskInfo(path string) (disk.Info, error)
	GetMajorMinorNumber(path string, physical bool) (uint32, uint32, error)
}

func NewLocalFileService

func NewLocalFileService(limitedPaths []string) (LocalFileService, error)

Jump to

Keyboard shortcuts

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