b82f0c02ed
FIX: * fs.FileMode for object type is 0 for regular files, so an additional parameter is needed.
32 lines
973 B
Go
32 lines
973 B
Go
package paths
|
|
|
|
import (
|
|
"io/fs"
|
|
)
|
|
|
|
// Mostly just for reference.
|
|
const (
|
|
// ModeDir | ModeSymlink | ModeNamedPipe | ModeSocket | ModeDevice | ModeCharDevice | ModeIrregular
|
|
modeDir pathMode = pathMode(fs.ModeDir)
|
|
modeSymlink pathMode = pathMode(fs.ModeSymlink)
|
|
modePipe pathMode = pathMode(fs.ModeNamedPipe)
|
|
modeSocket pathMode = pathMode(fs.ModeSocket)
|
|
modeDev pathMode = pathMode(fs.ModeDevice)
|
|
modeCharDev pathMode = pathMode(fs.ModeCharDevice)
|
|
modeIrregular pathMode = pathMode(fs.ModeIrregular)
|
|
modeAnyExceptRegular pathMode = modeDir | modeSymlink | modePipe | modeSocket | modeDev | modeCharDev | modeIrregular
|
|
)
|
|
|
|
// Times
|
|
const TimeAny pathTimeType = 0
|
|
const (
|
|
// TimeAccessed == atime
|
|
TimeAccessed pathTimeType = 1 << iota
|
|
// TimeCreated == "birth" time (*NOT* ctime! See TimeChanged)
|
|
TimeCreated
|
|
// TimeChanged == ctime
|
|
TimeChanged
|
|
// TimeModified == mtime
|
|
TimeModified
|
|
)
|