gitlab.com/evatix-go/core@v1.3.55/chmodhelper/GetExistingChmodRwxWrapperPtr.go (about) 1 package chmodhelper 2 3 import ( 4 "os" 5 6 "gitlab.com/evatix-go/core/errcore" 7 ) 8 9 func GetExistingChmodRwxWrapperPtr( 10 location string, 11 ) (*RwxWrapper, error) { 12 fileInfo, err := os.Stat(location) 13 14 if err != nil { 15 return nil, errcore.PathErrorType. 16 Error(err.Error(), ", file:"+location) 17 } 18 19 return New.RwxWrapper.UsingFileModePtr(fileInfo.Mode()), err 20 }