Java - File Input Output File Attributes

Introduction supports basic file attributes.

java.nio.attribute package contains the attribute-related classes.

Java supports the file attributes in the following six types of views.

Supported System

all platforms

manage the basic file attributes such as creation time, last access time, last modified time, size, file type (regular
file, directory, symbolic link, or other), and file key.
It can modify the creation time, the last accessed time, and the last modified time of a file.

on the systems
that support DOS
such as Windows.
access the file attributes that are specific to DOS.
It can check if a file is a hidden file, a system file, an archive file, and a read-only file.



POSIX stands for Portable Operating System Interface for UNIX.
It extends the BasicFileAttributeView to support POSIX system such as UNIX.
It can manage owner, group, and [related access] permissions.

System supporting
file Owner
manage the owner of a file.


ACL File System

ACL stands for Access Control List. It is a list of permissions attached to a file.
It lets you manage the ACL for a file.

manage a set of user-defined attributes in the form of name-value pairs.
The name of an attribute is a String. The value of an attribute could be of any data type.

Related Topics