What are the benefits of using FileUtils methods http://ruby-doc.org/core/classes/FileUtils.html than the equivalent Bash commands?
Over and above the fact that you don't have to worry about ensuring your target platform has the specific tools you're using installed, and over and above the problem of doing proper quoting of shell oddities (especially problematical if you target both Windows and Unix-alikes -- Cygwin, GNUWin32, etc. notwithstanding), if you use Ruby's FileUtils you have the moderately-sized overhead of a Ruby function call while if you use external utilities you have the rather sizable overhead of firing up an external process each and every "call".
The FileUtils methods work on Windows.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With