See: Description
Interface | Description |
---|---|
BasicFileAttributes |
Basic attributes associated with a file in a file system.
|
FileAttribute<T> |
An object that encapsulates the value of a file attribute that can be set
atomically when creating a new file or directory by invoking the
createFile or createDirectory methods. |
Class | Description |
---|---|
FileTime |
Represents the value of a file's time stamp attribute.
|
An attribute view provides a read-only or updatable view of the non-opaque values, or metadata, associated with objects in a file system. Views can be identified by name.
The BasicFileAttribute view defines the basic set of file attributes that are common to many file systems.
In addition to attribute views, this package also defines classes and interfaces that are used when accessing attributes:
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. The file attributes are retrieved from the file system as a bulk
operation by invoking the
Files.readAttributes
method.
Where dynamic access to file attributes is required, the attributes supported by this attribute view have the following names and types:
Name Type "lastModifiedTime" FileTime
"lastAccessTime" FileTime
"creationTime" FileTime
"size" Long
"isRegularFile" Boolean
"isDirectory" Boolean
"isSymbolicLink" Boolean
"isOther" Boolean
The getAttribute
method may be
used to read any of these attributes as if by invoking the Files.readAttributes
method.
The setAttribute
method may be
used to update the file's last modified time, last access time or create time
attributes.
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.
Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. Use of this specification is subject to license terms.