package
0.0.79
Repository: https://github.com/xhd2015/go-inspect.git
Documentation: pkg.go.dev

# README

File copy

The filecopy pakcage does filewalk and copy files from one place to another.

It seems trivil, but the initial implementation got wrong.

Original implementation uses a concurrent file walk to copy files. It blocks for large amount of files. The reason is that the consuming goroutine also writes directly to the channel, causing all goroutines to block when there is many more files to consume than it can consume.

After done some benchmark on file io(see https://github.com/xhd2015/bench-file-io), I decided to rewrite the implentation in a way that walk directory in one goroutine, and only send files for other goroutines to consume, that separates producing and consuming.

# Functions

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
SyncRebaseContents implements wise file sync, srcs are all sync into `rebaseDir` for generated contents, there is no physical content,.
No description provided by the author
No description provided by the author
SyncGeneratedMap when `sourceNewerChecker` returns true, the target file is overwritten.
No description provided by the author

# Structs

No description provided by the author

# Interfaces

FileInfo represents copy source.
No description provided by the author