add a stat(file) shortcut
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
78049e664d
commit
1fda646fef
9
unix.go
9
unix.go
|
@ -212,6 +212,15 @@ func IsDirectory(path string) bool {
|
|||
return info.IsDir()
|
||||
}
|
||||
|
||||
// returns true if the file exists
|
||||
func Exists(file string) bool {
|
||||
_, err := os.Stat(file)
|
||||
if err != nil {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
func VerifyLocalGoRepo(gorepo string) bool {
|
||||
// Get current user
|
||||
usr, err := user.Current()
|
||||
|
|
Loading…
Reference in New Issue