NIO2's Path.moveTo(...) needs renameTo(...) aequivalent, or at least javadoc clarification.
Alan.Bateman at Sun.COM
Thu Dec 17 08:15:08 UTC 2009
assembling signals wrote:
> Hello, everyone!
> It seems to be complicated/confusing to rename (not move) a file (a Path) using NIO2's Path.moveTo(...).
I'd suggest bringing this up on the nio-dev as there was a recent
discussion on this. In summary source.moveTo(target) will always attempt
a rename by default but it isn't clear from the javadoc (and that will
be fixed). See also http://bugs.sun.com/view_bug.do?bug_id=6878283 where
that discussion was looking for another option that will prevent moveTo
moving the file across file systems/volumes.
More information about the core-libs-dev