MCPcopy Create free account
hub / github.com/AdRoll/baker / fileExists

Function fileExists

pkg/splitwriter/split_writer.go:311–317  ·  view source on GitHub ↗

fileExists reports whether fname exists and is a regular file.

(fname string)

Source from the content-addressed store, hash-verified

309
310// fileExists reports whether fname exists and is a regular file.
311func fileExists(fname string) bool {
312 info, err := os.Stat(fname)
313 if os.IsNotExist(err) {
314 return false
315 }
316 return !info.IsDir()
317}
318
319// closeFiles closes a list of files and returns the first error (if any).
320func closeFiles(fs ...*os.File) (cerr error) {

Callers 1

openSplitFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected