-
Notifications
You must be signed in to change notification settings - Fork 33
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
[DOC] Enhanced RDoc for ::cp_r #75
Conversation
@jeremyevans, I've been dissatisfied with the tree-based examples. I'm thinking of trying Linux tree command to display file structure. Should I modify this PR as an experiment? @jeremyevans, NM. I'll try this out separately. |
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.
A couple minor changes requested. Can be merged without further review after those fixes are made.
lib/fileutils.rb
Outdated
@@ -691,30 +693,79 @@ def cp(src, dest, preserve: nil, noop: nil, verbose: nil) | |||
alias copy cp | |||
module_function :copy | |||
|
|||
# Copies files from +src+ to +dest+. |
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.
Probably should add recursively here, since that is how it differs from cp
. If src is a file, I'd argue it still does a recursive copy, even if it is a trivial case.
lib/fileutils.rb
Outdated
# | ||
# If +remove_destination+ is true, this method removes each destination file before copy. | ||
# If +src+ is the path to a file and +dest+ is the path to a directory, | ||
# copies +src+ to +dest+: |
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.
I think you want <tt>dest/src</tt>
here, since that's what you've used elsewhere.
No description provided.