NIO 2 Optional Arguments Flashcards
If provided, symbolic links when encountered will not be traversed. Useful for performing operations on symbolic links themselves rather than their target.
Test file existing Read file data Copy file Move file
NOFOLLOW_LINKS
If provided, symbolic links when encountered will be traversed.
Traverse a directory tree
FOLLOW_LINKS
If provided, all metadata about a file will be copied with it.
COPY_ATTRIBUTES
If provided and the target file exists, it will be replaced; otherwise, if it is not provided, an exception will be thrown if the file already exists.
REPLACE_EXISTING
The operation is performed in an atomic manner within the file system, ensuring that any process using the file sees only a complete record. Method using it may throw an exception if the feature is unsupported by the file system.
ATOMIC_MOVE