stat

package
v1.16.0 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2025 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 RawInfo added in v1.9.0

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

Types

type File added in v1.9.0

type File struct {
	FileTimes
	FileIDs
	FileLink

	Size int64

	Name    string
	AbsPath string
	IsDir   bool
	Perms   fs.FileMode

	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 FileIDs added in v1.14.0

type FileIDs struct {
	User  *user.User
	Group *user.Group

	SupportFileIDs bool
}

func NewFileIDs added in v1.14.0

func NewFileIDs(info os.FileInfo) (fids FileIDs, err error)
type FileLink struct {
	IsLink       bool
	PhysicalPath string
}
func NewFileLink(linfo os.FileInfo, path string) (fl FileLink, err error)

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
JackTT - Gopher 🇻🇳