Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 6878283
Votes 0
Synopsis (file) Path.moveTo option that prevents the operation copying the file
Category java:classes_nio
Reported Against
Release Fixed
State 3-Accepted, request for enhancement
Priority: 3-Medium
Related Bugs
Submit Date 02-SEP-2009
Description
Currently the moveTo method provides for two simple usages:

  source.moveTo(target) 

  source.moveTo(target, REPLACE_EXISTING)

and one advanced usage:

  source.moveTo(target, ATOMIC_MOVE)

The simple usages are allowed to implement the move as a copy+delete so that they can move the file to another volume/file-system. The advanced case is required to be atomic but cannot provide a guarantee that it won't override an existing file.

This RFE is submitted to consider the case where an application wants to rename a file and have it fail if the target is on another volume/file-system -- ie: something like:

	source.moveTo(target, NOCOPY_ALLOWED)
Posted Date : 2009-09-02 12:09:17.0
Work Around
if (target.notExists()) 
       source.moveTo(target, ATOMIC_MOVE);
Evaluation
N/A
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang