copy

package module
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2019 License: MIT Imports: 4 Imported by: 956

README

copy

Build Status codecov GoDoc Go Report Card

copy copies directories recursively.

Example:

err := Copy("your/directory", "your/directory.copy")

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func Copy

func Copy(src, dest string) error

Copy copies src to dest, doesn't matter if src is a directory or a file

Example
err := Copy("testdata/example", "testdata.copy/example")
fmt.Println("Error:", err)
info, _ := os.Stat("testdata.copy/example")
fmt.Println("IsDir:", info.IsDir())
Output:

Error: <nil>
IsDir: true

Types

This section is empty.

Jump to

Keyboard shortcuts

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