Hi everybody,
I see that in Files.move the NOFOLLOW_LINKS option is implicit. There is no need to specify it when moving a link right?
The_Nick
About Question enthuware.ocpjp.v7.2.1524 :
Moderator: admin
-
- Posts: 132
- Joined: Thu May 16, 2013 9:23 am
- Contact:
-
- Posts: 17
- Joined: Wed Jan 22, 2014 12:35 pm
- Contact:
Re: About Question enthuware.ocpjp.v7.2.1524 :
The explanation has Files.move(p1,p2) being wrong because it will throw a java.noi.file.FileAlreadyExistsException
However Files.move(p1,p2) is not a valid method.
However Files.move(p1,p2) is not a valid method.
-
- Site Admin
- Posts: 10078
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocpjp.v7.2.1524 :
There is : http://docs.oracle.com/javase/7/docs/ap ... .html#move(java.nio.file.Path, java.nio.file.Path, java.nio.file.CopyOption...)
The last argument can be omitted so the given option and the explanation are valid.
The last argument can be omitted so the given option and the explanation are valid.
If you like our products and services, please help us by posting your review here.
-
- Posts: 2
- Joined: Sun Sep 08, 2019 11:49 pm
- Contact:
Re: About Question enthuware.ocpjp.v7.2.1524 :
Also options with try-with-resources are incorrect not only because Path doesn't implement AutoCloseable. Even if it did, syntax is incorrect, you would get "Declaration, final or effectively final variable expected", because variable is neccessary.
Who is online
Users browsing this forum: No registered users and 33 guests