mirror of
https://github.com/golang/go
synced 2024-11-13 17:40:23 -07:00
os: add ModeType constant to mask file type bits
This covers the lack of IsRegular comfortably: if stat.Mode()&os.ModeType == 0 { ... } R=golang-dev, r, rsc, r, gustavo CC=golang-dev https://golang.org/cl/5440075
This commit is contained in:
parent
744fb52102
commit
d2b77bb194
@ -44,6 +44,9 @@ const (
|
||||
ModeSetuid // u: setuid
|
||||
ModeSetgid // g: setgid
|
||||
|
||||
// Mask for the type bits. For regular files, none will be set.
|
||||
ModeType = ModeDir | ModeSymlink | ModeNamedPipe | ModeSocket | ModeDevice
|
||||
|
||||
ModePerm FileMode = 0777 // permission bits
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user