stat

package
v1.13.3 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrGettingStruct = errors.New(
		po.Get("error getting the corresponding structure from fileinfo.Sys()"),
	)
	ErrNotSupportedOnWindows = errors.New(po.Get("not supported on windows"))
)

Functions

func AccessDate added in v1.11.0

func AccessDate(info os.FileInfo) (t time.Time, err error)

func CreationDate

func CreationDate(info os.FileInfo) (t time.Time, err error)

func Group

func Group(info os.FileInfo) (*user.Group, error)

func RawInfo added in v1.9.0

func RawInfo(name string) (file *os.File, stat os.FileInfo, abspath string, err error)

func Usr

func Usr(info os.FileInfo) (*user.User, error)

func UsrAndGroup

func UsrAndGroup(info os.FileInfo) (usr *user.User, group *user.Group, err error)

Types

type File added in v1.9.0

type File struct {
	FileTimes

	Size int64

	Name    string
	AbsPath string
	IsDir   bool
	Perms   fs.FileMode

	Group *user.Group
	User  *user.User

	FilesNumber int64
	// contains filtered or unexported fields
}

func NewFile added in v1.9.0

func NewFile(path string) (f File, err error)

func (*File) Load added in v1.9.0

func (f *File) Load(path string) (err error)

func (File) String added in v1.10.3

func (f File) String() string

type FileTimes added in v1.11.0

type FileTimes struct {
	ModTime             time.Time
	AccessTime          time.Time
	CreationTime        time.Time
	SupportCreationDate bool
}

func NewFileTimes added in v1.11.0

func NewFileTimes(info os.FileInfo) (times FileTimes, err error)

Jump to

Keyboard shortcuts

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