Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyAll ¶
CopyAll copies from source to destination where destination must be a directory if it exists or will be created as directory if it does not. If it exists and is not a directory CopyAll returns os.ErrExist.
Source can be a file or a directory. If it is a file it is copied to destination. If it is a directory it is enumerated and all its children are copied to destination creating subdirectories at destination as needed.
Symbolic links are skipped silently. Copying one is a noop and returns nil.
If overwrite is specified it silently overwrites existing destination files, otherwise returns an os.Exists mid operation with incomplete copy results.
Permissions of source files and directories carry over to destinations.
If any other error occurs is returned and it will be of type *os.PathError.
func CopyFile ¶ added in v0.0.3
CopyFile copies source file to destination file along with permissions or returns an error. Symlinks are skipped and return a nil error.
Types ¶
This section is empty.