copy

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: May 25, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package copy provides functions for copying files and directories. Originally derived from https://gist.github.com/r0l1/92462b38df26839a3ca324697c8cba04#file-copy-go-L118

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dir

func Dir(src string, dst string, skipFunc SkipFunc) (err error)

Dir recursively copies a directory tree. Source directory must exist. Symlinks are skipped.

func File

func File(src, dst string) (err error)

File copies the contents of the file named by src to the file named by dst. The file will be created if it does not already exist. If the destination file exists, all its contents will be replaced by the contents of the source file.

Types

type SkipFunc

type SkipFunc func(string, string) bool

SkipFunc is a callback that is used to determine whether or not to skip processing a directory entry

Jump to

Keyboard shortcuts

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