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