commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From DAINOSEB <daino...@libero.it>
Subject [FileUtils] CopyFile(File,File,boolean) fails, with data loss of destination file under some circumstances
Date Wed, 08 Feb 2012 23:18:01 GMT
Hi to All, and thanks for the welcome!
I amfairly newto the world ofjavawhilestillbeingan expert programmerin 
dealing withthe development offile-orientedapplications such ascobol for 
over20 years. therefore excuse me for lowknowledge
I greatly appreciate Apache community work and his collaboraborative 
philosophy, and Here I am to submit my issues and proposals on regards 
to the question above. But let's go with that:


Scenarios of failure (according to thecasesthat I checkedand tested on 
Windows xp-sp3 platform:
0) Generally: Copying the same file name with different "Rooth PAth" 
(according with new java.nio Class implementation, which moreover in 
this cases doesn't come in aid)
1) Copyng for example the file c:\tmp\test.txt to x:\test.txt, having 
made a SUBST x: c:\tmp with cmd.exe
2) Same issue when the local folder c:\tmp has been shared via Windows 
share mechanism
3) Same if the Windows (or even Samba) share involve another computer in 
the LAN

The first,simplest, case demonstrates the problem and the limit in java 
libraries that, perhaphs due to my java's inexperience, have troubled me 
for weeks.
At last I've found a solution which involves a lower level of dealing 
with a mix of RandomAccessFile and the new java.nio's GetChannel methods 
of treating a file stream.

But first I wanted to hear yours opinions and feedbacks if you ever have 
meet such problems and how have you solved tha question.

Good coding to all!


------------------------------------------------------------------------

Nessun virus nel messaggio.
Controllato da AVG - www.avg.com <http://www.avg.com>
Versione: 10.0.1424 / Database dei virus: 2112/4796 - Data di rilascio: 
08/02/2012


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


Mime
View raw message