MCPcopy Create free account
hub / github.com/remotemobprogramming/mob / createFileInPath

Function createFileInPath

mob_test.go:2220–2228  ·  view source on GitHub ↗
(t *testing.T, path, filename, content string)

Source from the content-addressed store, hash-verified

2218}
2219
2220func createFileInPath(t *testing.T, path, filename, content string) (pathToFile string) {
2221 contentAsBytes := []byte(content)
2222 pathToFile = path + "/" + filename
2223 err := os.WriteFile(pathToFile, contentAsBytes, 0644)
2224 if err != nil {
2225 failWithFailure(t, "creating file "+filename+" with content "+content, "error")
2226 }
2227 return
2228}
2229
2230func createExecutableFileInPath(t *testing.T, path, filename, content string) (pathToFile string) {
2231 ensureDirectoryExists(t, path)

Callers 2

createTestbedInFunction · 0.85
createFileFunction · 0.85

Calls 1

failWithFailureFunction · 0.70

Tested by

no test coverage detected