Documentation ¶
Index ¶
Constants ¶
View Source
const (
FormatJsonGnu = `` /* 136-byte string literal not displayed */
)
View Source
const (
// FormatTerseGnu
FormatTerseGnu = `%n %s %b %f %u %g %D %i %h %t %T %X %Y %Z %o`
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileMode ¶
type FileMode uint16
FileMode is a Linux file mode
const ( // ModeType is the mask for the type bits ModeType = 0o170000 ModeSocket FileMode = 0o140000 // socket ModeSymlink FileMode = 0o120000 // symbolic link ModeRegularFile FileMode = 0o100000 // regular file ModeBlockDevice FileMode = 0o060000 // block device ModeDirectory FileMode = 0o040000 // directory ModeCharDevice FileMode = 0o020000 // character device ModeNamedPipe FileMode = 0o010000 // FIFO ModeSetuid FileMode = 0o004000 // set UID bit ModeSetgid FileMode = 0o002000 // set-group-ID bit ModeStick FileMode = 0o001000 // sticky bit // ModePerm is the mask for the permission bits ModePerm FileMode = 0o777 // Unix permission bits )
func (FileMode) ToFsFileMode ¶
ToFsFileMode returns the equivalent fs.FileMode of a stat.FileMode.
type ParseError ¶
type ParseError struct {
// contains filtered or unexported fields
}
func (*ParseError) Error ¶
func (p *ParseError) Error() string
type Stat ¶
type Stat struct { Platform string Mode FileMode Name string Target string User string Uid int Group string Gid int Size int64 AccessTime time.Time ModifiedTime time.Time ChangeTime time.Time }
func ParseJsonFormat ¶
ParseJsonFormat parsed the provided output of `stat` which is formatted using FormatJsonGnu.
func ParseTerseFormat ¶
func (*Stat) ToFsFileInfo ¶
ToFsFileInfo returns the Stat as a fs.FileInfo
Click to show internal directories.
Click to hide internal directories.