MCPcopy Create free account
hub / github.com/github/copilot-sdk / WriteFile

Method WriteFile

go/internal/e2e/session_fs_e2e_test.go:355–365  ·  view source on GitHub ↗
(path string, content string, mode *int)

Source from the content-addressed store, hash-verified

353}
354
355func (h *testSessionFSHandler) WriteFile(path string, content string, mode *int) error {
356 fullPath := providerPath(h.root, h.sessionID, path)
357 if err := os.MkdirAll(filepath.Dir(fullPath), 0o755); err != nil {
358 return err
359 }
360 perm := os.FileMode(0o666)
361 if mode != nil {
362 perm = os.FileMode(*mode)
363 }
364 return os.WriteFile(fullPath, []byte(content), perm)
365}
366
367func (h *testSessionFSHandler) AppendFile(path string, content string, mode *int) error {
368 fullPath := providerPath(h.root, h.sessionID, path)

Callers 1

Calls 2

providerPathFunction · 0.85
WriteFileMethod · 0.65

Tested by

no test coverage detected