diff --git a/base/file.jl b/base/file.jl index f9deb5b9fbe48..85450ff2d3645 100644 --- a/base/file.jl +++ b/base/file.jl @@ -359,6 +359,13 @@ If `follow_symlinks=false`, and `src` is a symbolic link, `dst` will be created symbolic link. If `follow_symlinks=true` and `src` is a symbolic link, `dst` will be a copy of the file or directory `src` refers to. Return `dst`. + +!!! note + The `cp` function is different from the `cp` command. The `cp` function always operates on + the assumption that `dst` is a file, while the command does different things depending + on whether `dst` is a directory or a file. + Using `force=true` when `dst` is a directory will result in loss of all the contents present + in the `dst` directory, and `dst` will become a file that has the contents of `src` instead. """ function cp(src::AbstractString, dst::AbstractString; force::Bool=false, follow_symlinks::Bool=false)