fileutil

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2021 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AtomicWriteFile

func AtomicWriteFile(fs afero.Fs, filename string, r io.Reader, mode os.FileMode) error

nolint:godox TODO: func AtomicWriteFile(fs afero.Fs, filename string, r *bytes.Reader, mode os.FileMode) error {

func CopyDir

func CopyDir(fs afero.Fs, src, dst string) (err error)

func CopyFile

func CopyFile(fs afero.Fs, src, dst string) error

func RenameWithFallback

func RenameWithFallback(fs afero.Fs, src, dst string) error

RenameWithFallback attempts to rename a file or directory, but falls back to copying in the event of a cross-device link error. If the fallback copy succeeds, src is still removed, emulating normal rename behavior.

Types

This section is empty.

Jump to

Keyboard shortcuts

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