nerdexam
Oracle

1Z0-804 · Question #116

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

The correct answer is A. DOS file attributes can be read as a set in a single method call. File attributes associated with a file in a file system that supports legacy "DOS" attributes. DosFileAttributes attrs = Files.readAttributes(file, DosFileAttributes.class); The methodreadAttributes() reads a file's attributes as a bulk operation.

NIO.2

Question

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

Options

  • ADOS file attributes can be read as a set in a single method call.
  • BDOS file attributes can be changed as a set in a single method call.
  • CDOS file attributes can be modified for symbolic links and regular files.
  • DDOS file attributes can be modified in the same method that creates the file.

How the community answered

(23 responses)
  • A
    83% (19)
  • B
    4% (1)
  • C
    4% (1)
  • D
    9% (2)

Explanation

File attributes associated with a file in a file system that supports legacy "DOS" attributes. DosFileAttributes attrs = Files.readAttributes(file, DosFileAttributes.class); The methodreadAttributes() reads a file's attributes as a bulk operation.

Topics

#DOS file attributes#NIO.2#file system provider#attribute views

Community Discussion

No community discussion yet for this question.

Full 1Z0-804 Practice