commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Springer <...@apache.org>
Subject Re: Directory Copy -- IO
Date Wed, 05 Jan 2005 21:35:22 GMT
Lesaint Sébastien wrote:

>Hello Ian,
>
>Thanks for your answer.
>Indeed using IOFileFilter would be much more flexible, it's a good idea.
>
>Regards,
>
>Seb'
>
>PS: isn't this thread a little OT for commons-user list? Might be a good
>idea to post a copy to the dev list, but I'm just not registered to it.
>  
>

Hi Seb,

I attached a copy of this thread to the issue in BugZilla. Updates to 
BugZilla get sent to the dev mailing list automatically (see 
http://marc.theaimsgroup.com/?l=jakarta-commons-dev&m=110494413213367&w=2)

Regards,
Ian

>-----Message d'origine-----
>De : Ian Springer [mailto:ips@apache.org] 
>Envoyé : mercredi 5 janvier 2005 17:36
>À : Jakarta Commons Users List
>Objet : Re: Directory Copy -- IO
>
>Lesaint Sébastien wrote:
>  
>
>>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:alice@aconex.com] 
>>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: commons-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message