Hello all,
I'm not familiar with the bugzilla use and practices. I was wondering how is a patch, for example Bug 32944 referred below, validated as a good patch, the new methods accepted by the community and integrated into the library.
A committer would review the patch and make sure it is kosher before committing it. Providing unit tests as part of the patch, as I did, helps expedite this process.
As a matter of fact, I think methods such as copyDirectory(...) in FileUtils should provide a Boolean parameter to make the copy recursive or not. I think it is common need. Another Boolean parameter could be provided to specify if empty directories should be copied as well or not.
Probably the most flexible way to go would be to have an optional IOFileFilter parameter that would allow you to filter the files from the source dir that are copied. So there'd be the following sigs:
copyDirectory(File src, File dest)
copyDirectory(File src, File dest, boolean preserveTimestamp)
copyDirectory(File src, File dest, IOFileFilter filter)
copyDirectory(File src, File dest, IOFileFilter filter, boolean preserveTimestamp)
Ian
What do you people think about it?
Regards,
Seb'
-----Message d'origine-----
De : Alice Boxhall [mailto:[EMAIL PROTECTED] Envoy� : mercredi 5 janvier 2005 05:40
� : Jakarta Commons Users List
Objet : Re: Directory Copy -- IO
Oops -- Bug 32944 seems to cover this issue. http://issues.apache.org/bugzilla/show_bug.cgi?id=32944
Alice Boxhall wrote:
I've written a method which I'm currently using -- I'll patch that and add the patch and a test case to Bugzilla.
Cheers,
Alice
matthew.hawthorne wrote:
Alice Boxhall wrote:
I was wondering why there is no method in FileUtils to copy or move an entire directory. Surely this is a commonly needed function?
I was sure that there was such a method, but I looked and cannot find it. Maybe I was mistaken.
If you do end up writing this method, feel free to submit a patch to [io] in Bugzilla.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
