This repository has been archived on 2024-01-06. You can view files and clone it, but cannot push or open issues or pull requests.
Files
srv/file/file.go
Dave Gallant 49ea48976d Re-structure packages
Overhaul of package structure and other cleanup.
2020-04-04 20:19:46 -04:00

16 lines
253 B
Go

// Package file contains filesystem functions
package file
import (
"os"
)
// Exists returns true if a file exists
func Exists(filename string) bool {
info, err := os.Stat(filename)
if os.IsNotExist(err) {
return false
}
return !info.IsDir()
}