Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/otiai10/copy
/ functions
Functions
62 in github.com/otiai10/copy
⨍
Functions
62
◇
Types & classes
7
↓ 68 callers
Function
Copy
Copy copies src to dest, doesn't matter if src is a directory or a file.
copy.go:22
↓ 5 callers
Function
onError
onError lets caller to handle errors occurred when copying a file.
copy.go:346
↓ 4 callers
Function
copyNextOrSkip
copyNextOrSkip decide if this src should be copied or not. Because this "copy" could be called recursively, "info" MUST be given here, NOT nil.
copy.go:72
↓ 3 callers
Function
switchboard
switchboard switches proper copy functions regarding file type, etc... If there would be anything else here, add a case to this switchboard.
copy.go:44
↓ 2 callers
Function
fclose
fclose ANYHOW closes file, with assigning error raised during Close, BUT respecting the error already reported.
copy.go:338
↓ 2 callers
Function
preserveLtimes
(src, dest string)
preserve_ltimes.go:9
↓ 2 callers
Function
preserveOwner
(src, dest string, info fs.FileInfo)
preserve_owner.go:11
↓ 2 callers
Function
preserveTimes
(srcinfo os.FileInfo, dest string)
preserve_times.go:5
↓ 1 callers
Function
assureOptions
assureOptions struct, should be called only once. All optional values MUST NOT BE nil/zero after assured.
options.go:145
↓ 1 callers
Function
chmod
chmod ANYHOW changes file mode, with assigning error raised during Chmod, BUT respecting the error already reported.
permission_control.go:45
↓ 1 callers
Function
dcopy
dcopy is for a directory, with scanning contents inside the directory and pass everything to "copy" recursively.
copy.go:161
↓ 1 callers
Function
dcopyConcurrent
Copy this directory concurrently regarding semaphore of opt.intent
copy.go:240
↓ 1 callers
Function
dcopySequential
(srcdir, destdir string, contents []os.FileInfo, opt Options)
copy.go:227
↓ 1 callers
Function
fcopy
fcopy is for just a file, with considering existence of parent directory and file permission.
copy.go:88
↓ 1 callers
Function
getDefaultOptions
getDefaultOptions provides default options, which would be modified by usage-side.
options.go:124
↓ 1 callers
Function
getTimeSpec
(info os.FileInfo)
stat_times.go:13
↓ 1 callers
Function
lcopy
lcopy is for a symlink, with just creating a new symlink by replicating src symlink.
copy.go:313
↓ 1 callers
Function
onDirExists
(opt Options, srcdir, destdir string)
copy.go:263
↓ 1 callers
Function
onsymlink
(src, dest string, opt Options)
copy.go:280
↓ 1 callers
Function
pcopy
pcopy is for just named pipes
copy_namedpipes.go:12
↓ 1 callers
Function
setup
(m *testing.M)
test_setup_test.go:11
↓ 1 callers
Function
shouldCopyDirectoryConcurrent
(opt Options, srcdir, destdir string)
options.go:166
↓ 1 callers
Function
teardown
(m *testing.M)
all_test.go:27
Function
BenchmarkOptions_NumOfWorkers_0
(b *testing.B)
benchmark_test.go:8
Function
BenchmarkOptions_NumOfWorkers_2
(b *testing.B)
benchmark_test.go:16
Function
BenchmarkOptions_NumOfWorkers_4
(b *testing.B)
benchmark_test.go:24
Function
BenchmarkOptions_NumOfWorkers_8
(b *testing.B)
benchmark_test.go:32
Function
ExampleCopy
()
example_test.go:9
Function
ExampleOptions
()
example_test.go:21
Method
Read
(p []byte)
all_test.go:433
Function
TestCopy
(t *testing.T)
all_test.go:37
Function
TestCopy_NamedPipe
(t *testing.T)
all_test.go:140
Function
TestCopy_PathError
(t *testing.T)
patherror_test.go:14
Function
TestMain
(m *testing.M)
all_test.go:20
Function
TestOptions_CopyBufferSize
(t *testing.T)
all_test.go:334
Function
TestOptions_CopyRateLimit
(t *testing.T)
all_test.go:353
Function
TestOptions_FS
(t *testing.T)
all_test.go:419
Function
TestOptions_NumOfWorkers
(t *testing.T)
all_test.go:444
Function
TestOptions_OnDirExists
(t *testing.T)
all_test.go:277
Function
TestOptions_OnFileError
(t *testing.T)
all_test.go:379
Function
TestOptions_OnSymlink
(t *testing.T)
symlink_test.go:12
Function
TestOptions_OnSymlink
(t *testing.T)
symlink_test_x.go:12
Function
TestOptions_PermissionControl
(t *testing.T)
all_test.go:221
Function
TestOptions_PreferConcurrent
(t *testing.T)
all_test.go:450
Function
TestOptions_PreserveLTimes
(t *testing.T)
preserve_ltimes_x_test.go:12
Function
TestOptions_PreserveLTimes
(t *testing.T)
preserve_ltimes_test.go:13
Function
TestOptions_PreserveLTimesErrorReturn
(t *testing.T)
preserve_ltimes_test.go:30
Function
TestOptions_PreserveOwner
(t *testing.T)
all_test.go:347
Function
TestOptions_PreserveTimes
(t *testing.T)
all_test.go:258
Function
TestOptions_RenameDestination
(t *testing.T)
all_test.go:458
Function
TestOptions_Skip
(t *testing.T)
all_test.go:168
Function
TestOptions_Specials
(t *testing.T)
all_test.go:214
Function
TestOptions_Sync
(t *testing.T)
all_test.go:250
Function
getTimeSpec
(info os.FileInfo)
stat_times_darwin.go:11
Function
getTimeSpec
(info os.FileInfo)
stat_times_windows.go:11
Function
getTimeSpec
(info os.FileInfo)
stat_times_freebsd.go:11
Function
getTimeSpec
(info os.FileInfo)
stat_times_js.go:11
Function
getTimeSpec
TODO: check plan9 netbsd in future
stat_times_x.go:10
Function
pcopy
TODO: check plan9 netbsd aix illumos solaris in future pcopy is for just named pipes. Windows doesn't support them
copy_namedpipes_x.go:12
Function
preserveLtimes
(src, dest string)
preserve_ltimes_x.go:5
Function
preserveOwner
(src, dest string, info fs.FileInfo)
preserve_owner_x.go:7
Function
setup
(m *testing.M)
test_setup_x_test.go:10