copy

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2021 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyRegular

func CopyRegular(srcPath, dstPath string, fileinfo os.FileInfo, copyWithFileRange, copyWithFileClone *bool) error

CopyRegular copies the content of a file to another

func CopyRegularToFile

func CopyRegularToFile(srcPath string, dstFile *os.File, fileinfo os.FileInfo, copyWithFileRange, copyWithFileClone *bool) error

CopyRegularToFile copies the content of a file to another

func DirCopy

func DirCopy(srcDir, dstDir string, copyMode Mode, copyXattrs bool) error

DirCopy copies or hardlinks the contents of one directory to another, properly handling xattrs, and soft links

Copying xattrs can be opted out of by passing false for copyXattrs.

Types

type Mode

type Mode int

Mode indicates whether to use hardlink or copy content

const (
	// Content creates a new file, and copies the content of the file
	Content Mode = iota
	// Hardlink creates a new hardlink to the existing file
	Hardlink
)

Jump to

Keyboard shortcuts

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