Page 1 of 1

Oracle tutorial about Files.copy(Path1, Path2, StandardCopyOption.REPLACE_EXISTING);

Posted: Tue Aug 06, 2013 5:31 am
by The_Nick
Hi there,
Giving credit to the official java oracle tutorial: http://docs.oracle.com/javase/tutorial/ ... /copy.html
REPLACE_EXISTING – Performs the copy even when the target file already exists. If the target is a symbolic link, the link itself is copied (and not the target of the link). If the target is a non-empty directory, the copy fails with the FileAlreadyExistsException exception.
(Emphasis mine)

Ok I have tried it out and it actually gives back a DirectoryNotEmptyException. Do you confirm the oracle java tutorial glitch or it's just me misinterpretring the concept?

Thanks in advance.

The_Nick.

Re: Oracle tutorial about Files.copy(Path1, Path2, StandardCopyOption.REPLACE_EXISTING);

Posted: Tue Aug 06, 2013 9:01 am
by admin
Seems like the tutorial has an error.

-Paul.