CLDC 8 (JSR360 Final Release)

Package java.nio.file.attribute

Interfaces and classes providing access to file and file system attributes.

See: Description

Package java.nio.file.attribute Description

Interfaces and classes providing access to file and 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. 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:

Basic Attribute names

A file attribute view that provides a view of a basic set of file attributes common to many file systems. The basic set of file attributes consist of mandatory and optional file attributes as defined below.

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.

Since:
1.7, CLDC1.8
CLDC 8 (JSR360 Final Release)
April 15, 2014

Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. Use of this specification is subject to license terms.