I think the title says it all. How would I specify FOLLOW_LINKS? Why create an enum with just one option? For example, the method java.nio.file.Files.getLastModifiedTime(Path, LinkOption...) takes an array of LinkOption-s as argument. You have to pass something, yet you can only pass the one option available. This surprised me, and would like to know more about it.
Following links is the default behavior. I.e., if you don't specify NOFOLLOW_LINKS, then links are followed.
From the documentation of the Files.getLastModifiedTime()
method (emphasis mine):
The options array may be used to indicate how symbolic links are handled for the case that the file is a symbolic link. By default, symbolic links are followed and the file attribute of the final target of the link is read. If the option NOFOLLOW_LINKS is present then symbolic links are not followed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With