From: Stefan Lang Date: 2005-07-23T17:44:14+09:00 Subject: Re: What's a canonical way to copy a file? On Saturday 23 July 2005 10:35, Jeremy Henty wrote: > It's easy to copy a file with File#{open,read,write}, but I'm > surprised there isn't a prepackaged (OS-independent) API for it like > Perl's File::Copy. I've haven't found any solutions in ri, Pickaxe II > or the RAA. Have I missed something? > > Cheers, > > Jeremy Henty You get more with Ruby's FileUtils (comes with standard Ruby since 1.8.0): require 'fileutils' FileUtils.cp "source", "target" For a list of all methods with documentation: % ri FileUtils HTH, Stefan