Path: blob/master/src/java.base/share/classes/java/nio/file/attribute/package-info.java
41161 views
/*1* Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/2425/**26* Interfaces and classes providing access to file and file system attributes.27*28* <table class="striped" style="padding-left:2em; text-align:left">29* <caption style="display:none">Attribute views</caption>30* <thead>31* <tr><th scope="col">Attribute views</th>32* <th scope="col">Description</th></tr>33* </thead>34* <tbody>35* <tr><th scope="row"><i>{@link java.nio.file.attribute.AttributeView}</i></th>36* <td>Can read or update non-opaque values associated with objects in a file system</td></tr>37* <tr><th scope="row">38* <span style="padding-left:1em"><i>{@link java.nio.file.attribute.FileAttributeView}</i></span></th>39* <td>Can read or update file attributes</td></tr>40* <tr><th scope="row">41* <span style="padding-left:2em">42* <i>{@link java.nio.file.attribute.BasicFileAttributeView}</i></span></th>43* <td>Can read or update a basic set of file attributes</td></tr>44* <tr><th scope="row">45* <span style="padding-left:3em">46* <i>{@link java.nio.file.attribute.PosixFileAttributeView}</i></span></th>47* <td>Can read or update POSIX defined file attributes</td></tr>48* <tr><th scope="row">49* <span style="padding-left:3em">50* <i>{@link java.nio.file.attribute.DosFileAttributeView}</i></span></th>51* <td>Can read or update FAT file attributes</td></tr>52* <tr><th scope="row">53* <span style="padding-left:2em">54* <i>{@link java.nio.file.attribute.FileOwnerAttributeView}</i></span></th>55* <td>Can read or update the owner of a file</td></tr>56* <tr><th scope="row">57* <span style="padding-left:3em">58* <i>{@link java.nio.file.attribute.AclFileAttributeView}</i></span></th>59* <td>Can read or update Access Control Lists</td></tr>60* <tr><th scope="row">61* <span style="padding-left:2em">62* <i>{@link java.nio.file.attribute.UserDefinedFileAttributeView}</i></span></th>63* <td>Can read or update user-defined file attributes</td></tr>64* <tr><th scope="row">65* <span style="padding-left:1em"><i>{@link java.nio.file.attribute.FileStoreAttributeView}</i></span></th>66* <td>Can read or update file system attributes</td></tr>67* </tbody>68* </table>69*70* <p> An attribute view provides a read-only or updatable view of the non-opaque71* values, or <em>metadata</em>, associated with objects in a file system.72* The {@link java.nio.file.attribute.FileAttributeView} interface is73* extended by several other interfaces that provide views to specific sets of file74* attributes. {@code FileAttributeViews} are selected by invoking the {@link75* java.nio.file.Files#getFileAttributeView} method with a76* <em>type-token</em> to identify the required view. Views can also be identified77* by name. The {@link java.nio.file.attribute.FileStoreAttributeView} interface78* provides access to file store attributes. A {@code FileStoreAttributeView} of79* a given type is obtained by invoking the {@link80* java.nio.file.FileStore#getFileStoreAttributeView} method.81*82* <p> The {@link java.nio.file.attribute.BasicFileAttributeView}83* class defines methods to read and update a <em>basic</em> set of file84* attributes that are common to many file systems.85*86* <p> The {@link java.nio.file.attribute.PosixFileAttributeView}87* interface extends {@code BasicFileAttributeView} by defining methods88* to access the file attributes commonly used by file systems and operating systems89* that implement the Portable Operating System Interface (POSIX) family of90* standards.91*92* <p> The {@link java.nio.file.attribute.DosFileAttributeView}93* class extends {@code BasicFileAttributeView} by defining methods to94* access the legacy "DOS" file attributes supported on file systems such as File95* Allocation Table (FAT), commonly used in consumer devices.96*97* <p> The {@link java.nio.file.attribute.AclFileAttributeView}98* class defines methods to read and write the Access Control List (ACL)99* file attribute. The ACL model used by this file attribute view is based100* on the model defined by <a href="http://www.ietf.org/rfc/rfc3530.txt">101* <i>RFC 3530: Network File System (NFS) version 4 Protocol</i></a>.102*103* <p> In addition to attribute views, this package also defines classes and104* interfaces that are used when accessing attributes:105*106* <ul>107*108* <li> The {@link java.nio.file.attribute.UserPrincipal} and109* {@link java.nio.file.attribute.GroupPrincipal} interfaces represent an110* identity or group identity. </li>111*112* <li> The {@link java.nio.file.attribute.UserPrincipalLookupService}113* interface defines methods to lookup user or group principals. </li>114*115* <li> The {@link java.nio.file.attribute.FileAttribute} interface116* represents the value of an attribute for cases where the attribute value is117* required to be set atomically when creating an object in the file system. </li>118*119* </ul>120*121*122* <p> Unless otherwise noted, passing a {@code null} argument to a constructor123* or method in any class or interface in this package will cause a {@link124* java.lang.NullPointerException NullPointerException} to be thrown.125*126* @since 1.7127*/128129package java.nio.file.attribute;130131132