You might want to look at Pathname (http://ruby-doc.org/stdlib/libdoc/pathname/rdoc/classes/Pathname.html) It wraps alot of the File related libs into a nice package Cheers