fsutil

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 25, 2026 License: MIT Imports: 2 Imported by: 0

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 FileExists added in v0.3.0

func FileExists(path string) bool

FileExists reports whether path is an existing non-directory filesystem entry.

func WriteFileAtomic

func WriteFileAtomic(path string, data []byte, perm os.FileMode) error

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL