|
Quick Lists
|
|
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
|
PLEASE NOTE: JDK6 is formerly known as Project Mustang
|
|
|
 |