Documentation
¶
Index ¶
- func ContentOnly(o *options)
- func Copy(ctx context.Context, src, dst string, opts ...optFunc) (err error)
- func FollowSymlink(o *options)
- func Force(o *options)
- func RevertOnErr(o *options)
- func WithBufferSize(size int) optFunc
- func WithExclude(s ...string) optFunc
- func WithHash(h hash.Hash) optFunc
- func WithMove(o *options)
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContentOnly ¶
func ContentOnly(o *options)
ContentOnly copies only source folder content without creating root folder in destination.
func FollowSymlink ¶ added in v1.4.0
func FollowSymlink(o *options)
FollowSymlink resolves source file path before copy, to follow symlink if needed.
func RevertOnErr ¶ added in v1.2.0
func RevertOnErr(o *options)
RevertOnErr removes destination file if there was an error during copy process.
func WithBufferSize ¶ added in v1.2.0
func WithBufferSize(size int) optFunc
WithBufferSize allows to set custom buffer size for file copy. If provided size <= 0, then default will be used.
func WithExclude ¶ added in v1.4.0
func WithExclude(s ...string) optFunc
WithExclude excludes paths from copy which includes one of the given strings.
Types ¶
Click to show internal directories.
Click to hide internal directories.