[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [stellation-res] File.renameTo()
|
On Sat, Aug 24, 2002 at 11:15:15AM +0000, Mark C. Chu-Carroll wrote:
> On Saturday 24 August 2002 12:42 pm, Jonathan Gossage wrote:
> > This API is not safe to use on any platform. It will never succeed when a
> > move across file system boundaries is required (e.g. between a local file
> > system and NFS)and on Windows it will fail when trying to move a file from
> > one directory to another. The failure is reported, not by an exception, but
> > simply by returning "false".
>
> I knew about the filesystem restriction, but not the windows restriction.
>
> We didn't consider the filesystem restriction to be a big deal. Since the
> workspace is created and maintained by Stellation, it shouldn't ever
> be crossing filesystems. So moving things around within the workspace
> should never cause a problem.
>
> Windows is a different situation apparently.
>
> > One solution would be to use the Unix mv command, natively under Unix and
> > under Cygwin under Windows. Another, and I feel better solution, would be
> > to implement an internal method that provides the necessary subset of
> > functionality of the mv command.
>
> One solution would be to replace the File.rename with a copy to
> the new location, and delete from the old.
And penalize the sane architectures that can do that efficiently?
Uh-oh... java sucks for I/O more and more...
They rush to add mmap io but cannot provide a sane api to access the
directory structure.
florin
--
"If it's not broken, let's fix it till it is."
41A9 2BDE 8E11 F1C5 87A6 03EE 34B3 E075 3B90 DFE4
Attachment:
pgpGN62zsDdDm.pgp
Description: PGP signature