This commit is contained in:
sm
2015-08-09 16:20:47 -07:00
commit d65b52fedb
4 changed files with 72 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
package fs
import "os"
// Exists returns if a file exists
func Exists(path string) bool {
if _, err := os.Stat(path); err != nil {
return false
} else if os.IsNotExist(err) {
return false
}
return true
}