cp

package module
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2018 License: MIT Imports: 4 Imported by: 4

README

cp

GoDoc

cp is a small Go package for copying files and directories.

The API may change because I want to add some options in the future (for merging with existing dirs).

It does not currently handle Windows specifically (I think it may require some special treatment).

Documentation

Overview

Package cp offers simple file and directory copying for Go.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyAll

func CopyAll(dst, src string) error

CopyAll copies the file or (recursively) the directory at src to dst. Permissions are preserved. The target directory must not already exist.

func CopyAllOverwrite added in v1.1.0

func CopyAllOverwrite(dst, src string) error

CopyAllOverwrite is like CopyAll except that it recursively overwrites any existing directories or files.

func CopyFile

func CopyFile(dst, src string) error

CopyFile copies the file at src to dst. The new file must not exist. It is created with the same permissions as src.

func CopyFileOverwrite added in v1.1.0

func CopyFileOverwrite(dst, src string) error

CopyFileOverwrite is like CopyFile except that it overwrites dst if it already exists.

Types

This section is empty.

Jump to

Keyboard shortcuts

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