-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Add dereference_symlinks to File.cp* #12011
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
lib/elixir/lib/file.ex
Outdated
@@ -861,6 +869,18 @@ defmodule File do | |||
explicitly disallow this behaviour. If `source` is a `file` and `destination` | |||
is a directory, `{:error, :eisdir}` will be returned. | |||
|
|||
## Options | |||
|
|||
* `:on_conflict` - Invoked a file already exists in the destination. The function |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* `:on_conflict` - Invoked a file already exists in the destination. The function | |
* `:on_conflict` - Invoked if file already exists in the destination. The function |
lib/elixir/lib/file.ex
Outdated
|
||
* `:dereference_symlinks` - By default, this function will copy symlinks by creating | ||
symlinks that point to the same location. This option forces symlinks to be dereferenced | ||
and have their contents copied instead when set to true. If the dereferenced files |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and have their contents copied instead when set to true. If the dereferenced files | |
and have their contents copied instead when set to `true`. If the dereferenced files |
lib/elixir/lib/file.ex
Outdated
An optional `on_conflict` callback is invoked if the `destination_file` already | ||
exists. The function receives arguments for `source_file` and `destination_file`. | ||
It should return `true` if the existing file should be overwritten, `false` if |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps the to-be-deprecated clauses could be be mentioned (and discouraged) in the documentation until they are officially deprecated? Otherwise they get on a limbo, where they are allowed to be used but not documented, which can be confusing: "If I'm giving a function as argument instead of a list of options, why does it work?".
💚 💙 💜 💛 ❤️ |
Closes #11715.