Does anyone know what's broken about ftools?

All,

I just had a problem in my Rails app. where I was generating a ZIP file
(using rubyzip) on Linux and copying to a Windows share (mounted via
Samba) using ftools and sometimes partial copies would occur.

I then saw via perusing some posts online that “ftools is obsolete” and
even the pickaxe book says “The FileUtils library is now recommended
over ftools.”

I got my code working by using FileUtils, which is great, but can anyone
explain any known issues with ftools?

Thanks,
Wes

On 11/13/06, Wes G. [email protected] wrote:

I got my code working by using FileUtils, which is great, but can anyone
explain any known issues with ftools?

ftools operated by adding features to the ‘File’ class. That’s a
little messy and strange… so ‘fileutils’ moved all that into its own
module. (e.g. FileUtils.mv instead of File.mv).

The old one will still work, but you should probably avoid it, in case
it goes away in 1.9.

Wilson B. wrote:

In addition, I’ve experienced the exact same problem the OP describes -
partial copies to a Windows share mounted via Samba on Linux. I never
bothered to look at the implementation, but clearly the FileUtils.cp
implementation is superior to the ftools version of File.copy. So, part
of the reason that “ftools is obsolete” is because “FileUtils is
better”. :slight_smile:

Regards,

Dan

Is there another option for File.compare()?