| BradTrupp.com - Little slices of my life and my projects | BradTrupp.com -- Tags -- Code |
| ||
BradTrupp.com -- Tags -- Code -- Copy all files in a directory tree to a common destination. (Ruby)
Copy all files in a directory tree to a common destination. (Ruby)
Most podcast receiver programs keep each feed in separate subdirectories. I was using this Ruby utility to flatten out all the files into a single directory before I copy them to my mp3 player. I actually use Yapcaster now which writes all the files out to a single directory making this utility obsolete for my particular purpose. The ftools library makes available several class methods to the File class, for copying, moving, deleting, installing, and comparing files, as well as creating a directory path. You could also use FileUtils instead as it contains the same functionality.
Tags: Code Share: Del.icio.us | Digg | Facebook | Google Bookmarks | Reddit | Technorati | Twitter | Windows Live | Yahoo! My Web
|
|