All Projects → otiai10 → Copy

otiai10 / Copy

Licence: mit
Go copy directory recursively

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Copy

Fcfilemanager
iOS File Manager on top of NSFileManager for simplifying files management. 📂
Stars: ✭ 862 (+226.52%)
Mutual labels:  directory, files, copy
Copy Webpack Plugin
Copy files and directories with webpack
Stars: ✭ 2,679 (+914.77%)
Mutual labels:  files, copy
delete-empty
Recursively delete all empty folders in a directory and child directories.
Stars: ✭ 38 (-85.61%)
Mutual labels:  files, directory
Cpx
A cli tool to watch and copy file globs.
Stars: ✭ 394 (+49.24%)
Mutual labels:  directory, copy
Xcv
✂️ Cut, Copy and Paste files with Bash
Stars: ✭ 144 (-45.45%)
Mutual labels:  files, copy
Filebuster
An extremely fast and flexible web fuzzer
Stars: ✭ 176 (-33.33%)
Mutual labels:  directory, files
Voila
Voila is a domain-specific language launched through CLI tool for operating with files and directories in massive amounts in a fast & reliable way.
Stars: ✭ 78 (-70.45%)
Mutual labels:  files, directory
speedcopy
Patched python shutil.copyfile to allow faster speeds on samba shares.
Stars: ✭ 13 (-95.08%)
Mutual labels:  files, copy
odcrawler-frontend
A frontend for ODCrawler, an Open Directory search engine.
Stars: ✭ 20 (-92.42%)
Mutual labels:  files, directory
dirgen
Generate files and folders from a template file
Stars: ✭ 21 (-92.05%)
Mutual labels:  files, directory
copy
Copy files using glob patterns. Sync, async, promise or streams. (node.js utility)
Stars: ✭ 84 (-68.18%)
Mutual labels:  files, copy
files
Useful methods to manage files and directories
Stars: ✭ 27 (-89.77%)
Mutual labels:  files, directory
RecoverPy
🙈 Interactively find and recover deleted or 👉 overwritten 👈 files from your terminal
Stars: ✭ 189 (-28.41%)
Mutual labels:  files
fs-utils
Generalized file and path utils for Node.js projects.
Stars: ✭ 33 (-87.5%)
Mutual labels:  copy
replace-in-files
Replace text in one or more files or globs.
Stars: ✭ 21 (-92.05%)
Mutual labels:  files
github-content
Easily download files from github raw user content.
Stars: ✭ 21 (-92.05%)
Mutual labels:  files
zauberlehrling
Collection of tools and ideas for splitting up big monolithic PHP applications in smaller parts.
Stars: ✭ 28 (-89.39%)
Mutual labels:  files
fieldmask-utils
Protobuf Field Mask Go utils
Stars: ✭ 127 (-51.89%)
Mutual labels:  copy
directory-structure
📦 Print a directory tree structure in your Python code.
Stars: ✭ 40 (-84.85%)
Mutual labels:  directory
vector
Virus Ruby
Stars: ✭ 29 (-89.02%)
Mutual labels:  files

copy

Go Reference Actions Status codecov License: MIT Go Report Card GitHub tag (latest SemVer)

copy copies directories recursively.

Example Usage

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

Advanced Usage

// Options specifies optional actions on copying.
type Options struct {

	// OnSymlink can specify what to do on symlink
	OnSymlink func(src string) SymlinkAction

	// OnDirExists can specify what to do when there is a directory already existing in destination.
	OnDirExists func(src, dest string) DirExistsAction

	// Skip can specify which files should be skipped
	Skip func(src string) (bool, error)

	// AddPermission to every entities,
	// NO MORE THAN 0777
	AddPermission os.FileMode

	// Sync file after copy.
	// Useful in case when file must be on the disk
	// (in case crash happens, for example),
	// at the expense of some performance penalty
	Sync bool

	// Preserve the atime and the mtime of the entries
	// On linux we can preserve only up to 1 millisecond accuracy
	PreserveTimes bool

}
// For example...
opt := Options{
	Skip: func(src string) {
		return strings.HasSuffix(src, ".git")
	},
}
err := Copy("your/directory", "your/directory.copy", opt)

Issues

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].