fsnode

package
v0.69.0 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Directory

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

func NewDirectory

func NewDirectory(path string, mode *os.FileMode, user interface{}, group interface{}, ensureParentDirs bool) (*Directory, error)

NewDirectory creates a new directory with the given path, mode, user and group. user and group can be either a string (user name/group name), an int64 (UID/GID) or nil.

func (*Directory) EnsureParentDirs

func (d *Directory) EnsureParentDirs() bool

func (*Directory) Group

func (f *Directory) Group() interface{}

Group can return either a string (group name) or an int64 (GID)

func (*Directory) IsDir

func (d *Directory) IsDir() bool

func (*Directory) Mode

func (f *Directory) Mode() *os.FileMode

func (*Directory) Path

func (f *Directory) Path() string

func (*Directory) User

func (f *Directory) User() interface{}

User can return either a string (user name) or an int64 (UID)

type File

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

func NewFile

func NewFile(path string, mode *os.FileMode, user interface{}, group interface{}, data []byte) (*File, error)

NewFile creates a new file with the given path, data, mode, user and group. user and group can be either a string (user name/group name), an int64 (UID/GID) or nil.

func (*File) Data

func (f *File) Data() []byte

func (*File) Group

func (f *File) Group() interface{}

Group can return either a string (group name) or an int64 (GID)

func (*File) IsDir

func (f *File) IsDir() bool

func (*File) Mode

func (f *File) Mode() *os.FileMode

func (*File) Path

func (f *File) Path() string

func (*File) User

func (f *File) User() interface{}

User can return either a string (user name) or an int64 (UID)

type FsNode

type FsNode interface {
	Path() string
	Mode() *os.FileMode
	// User can return either a string (user name/group name), an int64 (UID/GID) or nil
	User() interface{}
	// Group can return either a string (user name/group name), an int64 (UID/GID) or nil
	Group() interface{}
	IsDir() bool
}

Jump to

Keyboard shortcuts

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