• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Errata - Sybex CSG 11 - Chapter 20 review question number 11

 
Greenhorn
Posts: 9
Spring Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This review question is about Files.move(), the answer says:

Next, the NOFOLLOW_LINKS option means that if the source is a symbolic link, the link itself and not the target will be copied at runtime



The Java API doc says this about move()

If the file is a symbolic link then the symbolic link itself, not the target of the link, is moved.

 It goes on to say that the options parameter may include ATOMIC_MOVE and/or REPLACE_EXISTING.

My suggestion is to update the answer explanation to remove NOFOLLOW_LINKS because the move() method will ignore it.
 
Ranch Hand
Posts: 72
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello.

I believe the same question is found in OCP Oracle Certified Professional Java SE 17 Developer Study Guide, this time in chapter 14 question 20.  The question talks about move(), while this sentence in the answer talks about copying.

Next, the NOFOLLOW_LINKS option means that if the source is a symbolic link, the link itself and not the target will be copied at runtime, so option C is also incorrect.



Is this a typo or am I missing something?
 
author & internet detective
Posts: 41967
911
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's definitely an error. (I've added it to the errata and credited you.) I can't call it a typo because we mixed up move/copy rather than simply using the wrong word.
 
catch it before it slithers away! Oh wait, it's a tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic