file

package
v0.0.0-...-2e99639 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PrivateFileMode grants owner to read/write a file.
	PrivateFileMode = 0o600
)

Variables

This section is empty.

Functions

func AtomicCopy

func AtomicCopy(srcFilepath, targetDir, targetFilename string) error

AtomicCopy copies file by reading the file then writing atomically into the target directory

func AtomicWrite

func AtomicWrite(path string, data []byte, mode os.FileMode) error

Write atomically by writing to a temporary file in the same directory then renaming

func AtomicWriteReader

func AtomicWriteReader(path string, data io.Reader, mode os.FileMode) error

func Copy

func Copy(srcFilepath, targetDir, targetFilename string) error

func DirEquals

func DirEquals(a, b string) (bool, error)

DirEquals check if two directories are referring to the same directory

func Exists

func Exists(name string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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