Skip to content

Commit

Permalink
Add file exists func
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeljguarino committed Sep 25, 2023
1 parent 6b3afba commit 13e1319
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions fs/file.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package fs

import (
"os"
)

func Exists(path string) bool {
_, err := os.Stat(path)
return !os.IsNotExist(err)
}

0 comments on commit 13e1319

Please sign in to comment.