Documentation
¶
Overview ¶
Package fsutil holds small filesystem helpers shared across the compiler.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WriteFileAtomic ¶
WriteFileAtomic writes data to a temporary file in the same directory as path and then renames it over path. Because os.Rename within a directory is atomic on POSIX (and replaces the destination on Windows via MoveFileEx), a concurrent reader — e.g. the dev server serving dist/styles.css or index.html — never observes the truncate-then-write window that os.WriteFile exposes. The parent directory must already exist (callers create it).
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.