Interfaces and classes providing access to file and file system attributes.
Attribute views Description java.nio.file.attribute.AttributeViewCan read or update non-opaque values associated with objects in a file system java.nio.file.attribute.FileAttributeViewCan read or update file attributes java.nio.file.attribute.BasicFileAttributeViewCan read or update a basic set of file attributes java.nio.file.attribute.PosixFileAttributeViewCan read or update POSIX defined file attributes java.nio.file.attribute.DosFileAttributeViewCan read or update FAT file attributes java.nio.file.attribute.FileOwnerAttributeViewCan read or update the owner of a file java.nio.file.attribute.AclFileAttributeViewCan read or update Access Control Lists java.nio.file.attribute.UserDefinedFileAttributeViewCan read or update user-defined file attributes java.nio.file.attribute.FileStoreAttributeViewCan read or update file system attributes
An attribute view provides a read-only or updatable view of the non-opaque
values, or metadata, associated with objects in a file system.
The java.nio.file.attribute.FileAttributeView interface is
extended by several other interfaces that that views to specific sets of file
attributes. FileAttributeViews are selected by invoking the java.nio.file.Files.getFileAttributeView method with a
type-token to identify the required view. Views can also be identified
by name. The java.nio.file.attribute.FileStoreAttributeView interface
provides access to file store attributes. A FileStoreAttributeView of
a given type is obtained by invoking the java.nio.file.FileStore.getFileStoreAttributeView method.
The java.nio.file.attribute.BasicFileAttributeView
class defines methods to read and update a basic set of file
attributes that are common to many file systems.
The java.nio.file.attribute.PosixFileAttributeView
interface extends BasicFileAttributeView by defining methods
to access the file attributes commonly used by file systems and operating systems
that implement the Portable Operating System Interface (POSIX) family of
standards.
The java.nio.file.attribute.DosFileAttributeView
class extends BasicFileAttributeView by defining methods to
access the legacy "DOS" file attributes supported on file systems such as File
Allocation Tabl (FAT), commonly used in consumer devices.
The java.nio.file.attribute.AclFileAttributeView
class defines methods to read and write the Access Control List (ACL)
file attribute. The ACL model used by this file attribute view is based
on the model defined by
RFC 3530: Network File System (NFS) version 4 Protocol.
In addition to attribute views, this package also defines classes and interfaces that are used when accessing attributes:
java.nio.file.attribute.UserPrincipal and
java.nio.file.attribute.GroupPrincipal interfaces represent an
identity or group identity. java.nio.file.attribute.UserPrincipalLookupService
interface defines methods to lookup user or group principals. java.nio.file.attribute.FileAttribute interface
represents the value of an attribute for cases where the attribute value is
required to be set atomically when creating an object in the file system. Unless otherwise noted, passing a null argument to a constructor
or method in any class or interface in this package will cause a NullPointerException to be thrown.