gitlab.com/evatix-go/core@v1.3.55/chmodhelper/GetPathExistStat.go (about) 1 package chmodhelper 2 3 import ( 4 "os" 5 ) 6 7 func GetPathExistStat(location string) *PathExistStat { 8 fileInfo, err := os.Stat(location) 9 isExist := err == nil || !os.IsNotExist(err) 10 11 return &PathExistStat{ 12 FileInfo: fileInfo, 13 IsExist: isExist, 14 Error: err, 15 Location: location, 16 } 17 }