A {@code DosFileAttributeView} is a {@link BasicFileAttributeView} thatadditionally supports access to the set of DOS attribute flags that are used to indicate if the file is read-only, hidden, a system file, or archived.
Where dynamic access to file attributes is required, the attributes supported by this attribute view are as defined by {@code BasicFileAttributeView}, and in addition, the following attributes are supported:
Name Type readonly {@link Boolean} hidden {@link Boolean} system {@link Boolean} archive {@link Boolean}
The {@link java.nio.file.Files#getAttribute getAttribute} method maybe used to read any of these attributes, or any of the attributes defined by {@link BasicFileAttributeView} as if by invoking the {@link #readAttributes readAttributes()} method.
The {@link java.nio.file.Files#setAttribute setAttribute} method maybe used to update the file's last modified time, last access time or create time attributes as defined by {@link BasicFileAttributeView}. It may also be used to update the DOS attributes as if by invoking the {@link #setReadOnly setReadOnly}, {@link #setHidden setHidden}, {@link #setSystem setSystem}, and {@link #setArchive setArchive} methods respectively. @since 1.7
|
|
|
|