stat

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2023 License: LGPL-2.1 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Stat

type Stat struct {
	Path    string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
	Mode    uint32 `protobuf:"varint,2,opt,name=mode,proto3" json:"mode,omitempty"`
	Uid     uint32 `protobuf:"varint,3,opt,name=uid,proto3" json:"uid,omitempty"`
	Gid     uint32 `protobuf:"varint,4,opt,name=gid,proto3" json:"gid,omitempty"`
	Size_   int64  `protobuf:"varint,5,opt,name=size,proto3" json:"size,omitempty"`
	ModTime int64  `protobuf:"varint,6,opt,name=modTime,proto3" json:"modTime,omitempty"`
	// int32 typeflag = 7;
	Linkname string   `protobuf:"bytes,7,opt,name=linkname,proto3" json:"linkname,omitempty"`
	Devmajor int64    `protobuf:"varint,8,opt,name=devmajor,proto3" json:"devmajor,omitempty"`
	Devminor int64    `protobuf:"varint,9,opt,name=devminor,proto3" json:"devminor,omitempty"`
	Xattrs   XattrMap `` /* 154-byte string literal not displayed */
}

Stat comes from https://github.com/tonistiigi/fsutil/blob/a3696a2f1f2701cd6f9b75656d1c1b598619281d/types/stat.pb.go#L29

func NewStat

func NewStat(path string) *Stat

NewStat returns a new Stat object initialized with the given path, which may be relative to another directory (and therefore not useable in function calls)

func (*Stat) PopulateFromFileInfo

func (s *Stat) PopulateFromFileInfo(path string, fi fs.FileInfo)

PopulateFromFileInfo populates the member fields with information from the given fi (fs.FileInfo) and by gathering additional information from lower-level OS APIs as available; the given path MUST be a valid path which can be used in function calls (not an externally-relative path)

type XattrMap

type XattrMap map[string][]byte

Jump to

Keyboard shortcuts

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