Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ErrorSkip ¶
type ErrorSkip struct { // File is what is being skipped. File string }
ErrorSkip can be returned by PreHook to skip a file when copying.
func NewErrorSkip ¶
type Options ¶
type Options struct { // Recurse into subdirectories, copying their // contents. Recursive bool // Clobber (overwrite) file or directory if it // already exists. Clobber bool // If FollowSymlinks is set, copy the file pointed to by // the symlink instead of the symlink itself. FollowSymlinks bool // Be verbose, showing each file being copied. Verbose bool // PreHook is called, if specified, on each file before // it is copied. // // If PreHook returns ErrorSkip, the current file // is skipped and Copy returns nil. // // If PreHook returns another non-nil error, the // current file is skipped and Copy returns the error. PreHook func(src, dst string, srcInfo os.FileInfo) error // PostHook is called, if specified, on the current // file after it is copied. PostHook func(src, dst string) }
Options provides configuration for copying.
func GetDefaultOptions ¶
func GetDefaultOptions() Options
GetDefaultOptions returns an Options struct populated with the default options.
Click to show internal directories.
Click to hide internal directories.