(path string, content string, mode *int)
| 353 | } |
| 354 | |
| 355 | func (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 | |
| 367 | func (h *testSessionFSHandler) AppendFile(path string, content string, mode *int) error { |
| 368 | fullPath := providerPath(h.root, h.sessionID, path) |
no test coverage detected