When using the default file system provider with a JVM running on a DOS-based file system, which statement is true?

When using the default file system provider with a JVM running on a DOS-based file system, which statement is true?

When using the default file system provider with a JVM running on a DOS-based file system, which statement is true?

A.
DOS file attributes can be read as a set in a single method call.

B.
DOS file attributes can be changed as a set in a single method call.

C.
DOS file attributes can be modified for symbolic links and regular files.

D.
DOS file attributes can be modified in the same method that creates the file.

Explanation:
File attributes associated with a file in a file system that supports legacy “DOS” attributes.
Usage Example:

Path file = …
DosFileAttributes attrs = Files.readAttributes(file, DosFileAttributes.class);

Note:
The methodreadAttributes() reads a file’s attributes as a bulk operation.



Leave a Reply 2

Your email address will not be published. Required fields are marked *


Naresh

Naresh

Correct Answer A

wojtek

wojtek

C would be correct if:
DOS file attributes can be modified for regular files

set is used for POSIX attributes