NIO 2 Optional Arguments Flashcards

1
Q

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

A

NOFOLLOW_LINKS

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

If provided, symbolic links when encountered will be traversed.

Traverse a directory tree

A

FOLLOW_LINKS

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

If provided, all metadata about a file will be copied with it.

A

COPY_ATTRIBUTES

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

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.

A

REPLACE_EXISTING

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

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.

A

ATOMIC_MOVE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly