Registry / utility / dchest-safefile

dchest-safefile

JSON →
library0.0.0-20151022103144-855e8d98f185gogounverified

Package safefile implements safe atomic saving of files by writing to a temporary file and renaming on commit.

go get github.com/dchest/safefile
INSTALL
IMPORT
SIG · DCHEST-SAFEFILE
D
dchest-safefile
utilitygov0.0.0-20151022103144-855e8d98f185
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

safefile
github.com/dchest/safefile

Atomically saves a file by writing to a temporary file and committing.

package main import ( "fmt" "github.com/dchest/safefile" ) func main() { f, _ := safefile.Create("example.txt", 0644) f.Write([]byte("Hello, world!")) f.Commit() fmt.Println("File saved atomically") }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.0.0-20151022103144-855e8d98f185latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
dchest-safefile — go get dchest-safefile · libregistry