carlos / platform Public

Clone
git clone https://amadan.net/carlos/platform

Plain git — no account needed to clone.

Download

Download this file

1//go:build linux && rootrunner
2
3package safefile
4
5import (
6 "io"
7 "os"
8)
9
10func WriteAtFault(dir int, name string, body []byte, mode os.FileMode, step func(string, func() error) error) error {
11 return writeAtSteps(dir, name, mode, func(w io.Writer) error { _, err := w.Write(body); return err }, step)
12}
13