Documentation
¶
Index ¶
- Variables
- func AtomicWrite(path string, data []byte) (err error)
- func Copy(src, dst string) error
- func Exists(path string) (bool, error)
- func IsEmpty(path string) (bool, error)
- func WriteDataURLToFile(url string, destination string) (string, error)
- func WriteFile(output []byte, outputPath string) (string, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrorFailedToSplitDataURL = errors.New("Failed to split data URL into 2 parts")
)
Functions ¶
func AtomicWrite ¶ added in v0.20.0
AtomicWrite writes data to path via a temp file + fsync + rename so readers never see a partial file. Parent directories are created as needed. Modeled after tailscale.com/atomicfile.
func WriteDataURLToFile ¶ added in v0.15.6
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.