Documentation
¶
Overview ¶
Package privatefile provides dependency-minimal owner-only atomic writes for sensitive artifacts used below the config/util dependency layer.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Write ¶
Write atomically replaces path with owner-only bytes. A missing parent is created at 0700. Existing parent modes are never changed because path may be an operator-selected location. Symlinks and filesystems that cannot replace an anchored inode fall back to a chmod-before-truncate write.
func WriteAnchored ¶
WriteAnchored preserves an existing target inode. Use it for operator-owned config and credential files that may be bind-mounted, symlinked, hard-linked, or writable while their parent directory is not. Fresh files still use the atomic Write path.
Types ¶
This section is empty.