github.com/rita33cool1/iot-system-gateway@v0.0.0-20200911033302-e65bde238cc5/docker-engine/pkg/system/lstat_unix.go (about) 1 // +build !windows 2 3 package system // import "github.com/docker/docker/pkg/system" 4 5 import ( 6 "syscall" 7 ) 8 9 // Lstat takes a path to a file and returns 10 // a system.StatT type pertaining to that file. 11 // 12 // Throws an error if the file does not exist 13 func Lstat(path string) (*StatT, error) { 14 s := &syscall.Stat_t{} 15 if err := syscall.Lstat(path, s); err != nil { 16 return nil, err 17 } 18 return fromStatT(s) 19 }