(dir, name string, data []byte, perm os.FileMode, replace bool)
| 320 | } |
| 321 | |
| 322 | func rootedWriteOutputFile(dir, name string, data []byte, perm os.FileMode, replace bool) error { |
| 323 | if dir == "" { |
| 324 | return safepaths.WriteFile(name, data, perm, 0o755, replace) |
| 325 | } |
| 326 | |
| 327 | root, err := safepaths.OpenRootDir(dir, 0o755) |
| 328 | if err != nil { |
| 329 | return err |
| 330 | } |
| 331 | defer root.Close() |
| 332 | return root.WriteFile(name, data, perm, 0o755, replace) |
| 333 | } |
nothing calls this directly
no test coverage detected