copy

package
v0.0.17 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BUFFERSIZE                  = 4096
	DefaultModeDir  fs.FileMode = 0755 // rwxr-xr-x
	DefaultModeFile fs.FileMode = 0644 // rw-r--r--
)

Variables

This section is empty.

Functions

func ByteCount

func ByteCount(b uint) string

func CopyFile

func CopyFile(src, dst string, sourceFileStat fs.FileInfo, dry bool) error

CopyFile copies src to dst. If dst exists, it will be overwritten. mtime and atime of the destination file will be set to that of the source file

func CopyPerm

func CopyPerm(src, dst string) error

CopyPerm tries to copy permissions from src to dst file

func CreateDir

func CreateDir(dst string, dry bool) error

createDir wraps os.MkdirAll and ignores dir exists error

func DeleteFileOrDir

func DeleteFileOrDir(dst string, dstInfo fs.FileInfo, dry bool) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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