Files
go-i2p/lib/common/utils.go

15 lines
194 B
Go
Raw Normal View History

2016-01-28 10:16:26 -05:00
package common
import (
2016-01-29 07:22:31 -05:00
"os"
2016-01-28 10:16:26 -05:00
)
// check if a file is there and writeable
func FileExists(fname string) (exists bool) {
2016-01-29 07:22:31 -05:00
_, err := os.Stat(fname)
if err == nil {
exists = true
}
return
2016-01-28 10:16:26 -05:00
}