Documentation
¶
Overview ¶
Package filepublication owns complete same-directory file preparation and released-platform atomic no-replace namespace publication.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MoveNoReplace ¶
MoveNoReplace atomically moves one filesystem entry to an absent destination. It never copies, traverses, or replaces either entry.
func Publish ¶
Publish writes contents with mode to a same-directory temporary file and atomically creates path only when it is absent.
func PublishConfined ¶ added in v0.34.0
func PublishConfined(root confinedRoot, destination string, contents []byte, mode fs.FileMode) error
PublishConfined prepares and publishes a complete file through root-confined operations. Link supplies the atomic no-replace namespace operation: the complete temporary inode becomes visible at path only when path is absent.
Types ¶
type CommittedCleanupError ¶ added in v0.34.0
CommittedCleanupError reports that destination was committed but its same-directory publication temporary could not be removed.
func (*CommittedCleanupError) Error ¶ added in v0.34.0
func (e *CommittedCleanupError) Error() string
func (*CommittedCleanupError) Unwrap ¶ added in v0.34.0
func (e *CommittedCleanupError) Unwrap() error
Unwrap preserves the cleanup failure identity.