31 May '14, 9pm

fun_with_files (0.0.8): A more intuitive syntax for performing a variety of file actions. Examples:

A more intuitive syntax for performing a variety of file actions. Examples: "/".fwf_filepath.join('usr', 'bin', 'bash').touch FunWith::Files::FilePath.home("Music").glob(:ext => "mp3", :recurse => true) home = FunWith::Files::FilePath.home home.touch( "Music", "CDs", "BubbleBoyTechnoRemixxxx2011", "01-jiggypalooza.mp3" ) home.touch_dir( "Music", "CDs", "ReggaeSmackdown2008" ) do |dir| dir.touch( "liner_notes.txt" ) dir.touch( "cover.jpg" ) dir.touch( "01-tokin_by_the_sea.mp3" ) dir.touch( "02-tourists_be_crazy_mon.mp3" ) end

Full article: http://rubygems.org/gems/fun_with_files

Tweets