xstat

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2024 License: GPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoSpace  = errors.New("not enough space in buffer")
	ErrTooSmall = errors.New("input buf not big enough for unmarshalling")
	ErrTooBig   = errors.New("unsafe marshalled size")
)

Functions

This section is empty.

Types

type Xattr

type Xattr map[string]string

func (Xattr) String

func (x Xattr) String() string

type Xstat

type Xstat struct {
	syscall.Stat_t

	// extended attrs
	Xattr Xattr

	Name string
}

func New

func New(p string, fi os.FileInfo, x bool) (*Xstat, error)

func NewFromPath

func NewFromPath(p string, xattr bool) (*Xstat, error)

func (*Xstat) Atime

func (x *Xstat) Atime() time.Time

func (*Xstat) Ctime

func (x *Xstat) Ctime() time.Time

func (*Xstat) Equal

func (x *Xstat) Equal(b *Xstat) bool

return true if every important field of x matches corresponding fields of b

func (*Xstat) IsDir

func (x *Xstat) IsDir() bool

func (*Xstat) IsRegular

func (x *Xstat) IsRegular() bool
func (x *Xstat) IsSymlink() bool

func (*Xstat) MarshalBinary

func (x *Xstat) MarshalBinary(nm string, buf []byte) (int, error)

MarshalBinary encodes xstat into a binary buffer using nm as the file name The caller may wish to use a truncated or shorter name

func (*Xstat) MarshalSize

func (x *Xstat) MarshalSize(nm string) int

func (*Xstat) Mtime

func (x *Xstat) Mtime() time.Time

func (*Xstat) Perm

func (x *Xstat) Perm() uint

func (*Xstat) String

func (x *Xstat) String() string

func (*Xstat) UnmarshalBinary

func (x *Xstat) UnmarshalBinary(buf []byte) (int, error)

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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