Created
May 30, 2017 06:08
-
-
Save ymgyt/e7dc9dffe2f35bcda3c36f57694e3f6f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func exists(path string) (bool, error) { | |
_, err := v.fs.Stat(path) | |
if err == nil { | |
return true, nil | |
} | |
if os.IsNotExist(err) { | |
return false, nil | |
} | |
return false, err | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment