MCPcopy Create free account
hub / github.com/driangle/taskmd / createDirAndFile

Function createDirAndFile

apps/cli/internal/cli/context_test.go:119–128  ·  view source on GitHub ↗
(t *testing.T, root, relPath, content string)

Source from the content-addressed store, hash-verified

117}
118
119func createDirAndFile(t *testing.T, root, relPath, content string) {
120 t.Helper()
121 fullPath := filepath.Join(root, relPath)
122 if err := os.MkdirAll(filepath.Dir(fullPath), 0o755); err != nil {
123 t.Fatalf("mkdir: %v", err)
124 }
125 if err := os.WriteFile(fullPath, []byte(content), 0o644); err != nil {
126 t.Fatalf("write: %v", err)
127 }
128}
129
130func resetContextFlags() {
131 ctxTaskID = ""

Callers 1

createContextTestFilesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected