MCPcopy Create free account
hub / github.com/Driver-C/tryssh / CheckFileIsExist

Function CheckFileIsExist

pkg/utils/file.go:45–48  ·  view source on GitHub ↗

CheckFileIsExist returns true if the file exists (including when unreadable due to permissions).

(filename string)

Source from the content-addressed store, hash-verified

43
44// CheckFileIsExist returns true if the file exists (including when unreadable due to permissions).
45func CheckFileIsExist(filename string) bool {
46 _, err := os.Stat(filename)
47 return err == nil || !os.IsNotExist(err)
48}
49
50// CreateFile creates an empty file with the specified permissions atomically.
51func CreateFile(filePath string, perm fs.FileMode) error {

Calls

no outgoing calls