lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From petite_abeille <petite_abei...@mac.com>
Subject Re: FSDirectory patch for file renaming
Date Tue, 18 Feb 2003 21:46:42 GMT

On Tuesday, Feb 18, 2003, at 22:19 Europe/Zurich, Sale, Doug wrote:

> i can call java.io.File.delete() and then java.io.File.exists() on the 
> same
> fila, and receive true (sporadically).

Yes... it's one of those things... in any case... as far as renaming 
goes... the easiest hack is to simply call delete() on the 
(non-existent) destination file before a rename... this seems to flush 
something, somewhere... something along the line of:

aDestinationFile.delete();

aSourceFile.renameTo( aDestinationFile );

Cheers,

PA.

P.S.

File.renameTo() doesn't work across volumes... at least on osx + 1.3.1


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


Mime
View raw message