fsnode

package
v0.233.0 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2026 License: Apache-2.0 Imports: 8 Imported by: 1

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) Mode

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

func (*Directory) Path

func (f *Directory) Path() string

func (*Directory) UnmarshalJSON added in v0.40.2

func (d *Directory) UnmarshalJSON(data []byte) error

func (*Directory) UnmarshalYAML added in v0.40.2

func (d *Directory) UnmarshalYAML(unmarshal func(any) error) error

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 NewFileForURI added in v0.40.2

func NewFileForURI(targetPath string, mode *os.FileMode, user interface{}, group interface{}, uriStr string) (*File, error)

NewFleForURI creates a new file from the given "URI" (currently only local file are supported).

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) Mode

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

func (*File) Path

func (f *File) Path() string

func (*File) URI added in v0.40.2

func (f *File) URI() string

func (*File) UnmarshalJSON added in v0.40.2

func (f *File) UnmarshalJSON(data []byte) error

func (*File) UnmarshalYAML added in v0.40.2

func (f *File) UnmarshalYAML(unmarshal func(any) error) error

func (*File) User

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

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

Jump to

Keyboard shortcuts

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