Skip to content
cattlecloudPublic

About

atomicfs is a library for atomic file system operations in Go

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Repository files navigation

atomicfs

A library for atomic filesystem operations in Go.

Go Reference License Build

Overview

The cattlecloud.net/go/atomicfs/v2 module provides a package for performing atomic filesystem operations.

Reading material

Getting Started

The atomicfs package can be added to a project with go get.

go get cattlecloud.net/go/atomicfs/v2@latest
import "cattlecloud.net/go/atomicfs/v2"

Examples

Written files default to mode 0660 (read-write for the owner and group). Pass atomicfs.WithMode to override it:

writer := atomicfs.New(
    atomicfs.WithTempDir("/tmp"),
    atomicfs.WithMode(0600), // custom file mode
)

input := strings.NewReader("hello, world")
_ = writer.WriteFile("/path/to/output.txt", input)

Contributing

The cattlecloud.net/go/atomicfs/v2 module is always improving with new features and error corrections. For contributing bug fixes and new features please file an issue.

License

The cattlecloud.net/go/atomicfs/v2 module is open source under the BSD-3-Clause license.

About

atomicfs is a library for atomic file system operations in Go

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Used by

Contributors

Languages