atomic

package
v0.0.0-...-f4bd7b1 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2015 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package atomic provides atomic file write semantics by leveraging Rename's() atomicity.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	*os.File
	// contains filtered or unexported fields
}

File container provided for atomic file writes

func FileCreate

func FileCreate(filePath string) (*File, error)

FileCreate creates a new file at filePath for atomic writes, it also creates parent directories if they don't exist

func (*File) Close

func (f *File) Close() error

Close the file replacing, returns an error if any

func (*File) CloseAndPurge

func (f *File) CloseAndPurge() error

CloseAndPurge removes the temp file, closes the transaction and returns an error if any

Jump to

Keyboard shortcuts

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