1 /* 2 * Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. Oracle designates this 8 * particular file as subject to the "Classpath" exception as provided 9 * by Oracle in the LICENSE file that accompanied this code. 10 * 11 * This code is distributed in the hope that it will be useful, but WITHOUT 12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 * version 2 for more details (a copy is included in the LICENSE file that 15 * accompanied this code). 16 * 17 * You should have received a copy of the GNU General Public License version 18 * 2 along with this work; if not, write to the Free Software Foundation, 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 * 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 */ 25 26 /** 27 * Interfaces and classes providing access to file and file system attributes. 28 * 29 * <blockquote><table class="borderless"> 30 * <caption style="display:none">Attribute views</caption> 31 * <tr><th style="text-align:left">Attribute views</th> 32 * <th style="text-align:left">Description</th></tr> 33 * <tr><td><i>{@link java.nio.file.attribute.AttributeView}</i></td> 34 * <td>Can read or update non-opaque values associated with objects in a file system</td></tr> 35 * <tr><td style="vertical-align:top"> 36 * <i>{@link java.nio.file.attribute.FileAttributeView}</i></td> 37 * <td>Can read or update file attributes</td></tr> 38 * <tr><td style="vertical-align:top"> 39 * 40 * <i>{@link java.nio.file.attribute.BasicFileAttributeView} </i></td> 41 * <td>Can read or update a basic set of file attributes</td></tr> 42 * <tr><td style="vertical-align:top"> 43 * 44 * <i>{@link java.nio.file.attribute.PosixFileAttributeView} </i></td> 45 * <td>Can read or update POSIX defined file attributes</td></tr> 46 * <tr><td style="vertical-align:top"> 47 * 48 * <i>{@link java.nio.file.attribute.DosFileAttributeView} </i></td> 49 * <td>Can read or update FAT file attributes</td></tr> 50 * <tr><td style="vertical-align:top"> 51 * 52 * <i>{@link java.nio.file.attribute.FileOwnerAttributeView} </i></td> 53 * <td>Can read or update the owner of a file</td></tr> 54 * <tr><td style="vertical-align:top"> 55 * 56 * <i>{@link java.nio.file.attribute.AclFileAttributeView} </i></td> 57 * <td>Can read or update Access Control Lists</td></tr> 58 * <tr><td style="vertical-align:top"> 59 * 60 * <i>{@link java.nio.file.attribute.UserDefinedFileAttributeView} </i></td> 61 * <td>Can read or update user-defined file attributes</td></tr> 62 * <tr><td style="vertical-align:top"> 63 * <i>{@link java.nio.file.attribute.FileStoreAttributeView}</i></td> 64 * <td>Can read or update file system attributes</td></tr> 65 * </table></blockquote> 66 * 67 * <p> An attribute view provides a read-only or updatable view of the non-opaque 68 * values, or <em>metadata</em>, associated with objects in a file system. 69 * The {@link java.nio.file.attribute.FileAttributeView} interface is 70 * extended by several other interfaces that provide views to specific sets of file 71 * attributes. {@code FileAttributeViews} are selected by invoking the {@link 72 * java.nio.file.Files#getFileAttributeView} method with a 73 * <em>type-token</em> to identify the required view. Views can also be identified 74 * by name. The {@link java.nio.file.attribute.FileStoreAttributeView} interface 75 * provides access to file store attributes. A {@code FileStoreAttributeView} of 76 * a given type is obtained by invoking the {@link 77 * java.nio.file.FileStore#getFileStoreAttributeView} method. 78 * 79 * <p> The {@link java.nio.file.attribute.BasicFileAttributeView} 80 * class defines methods to read and update a <em>basic</em> set of file 81 * attributes that are common to many file systems. 82 * 83 * <p> The {@link java.nio.file.attribute.PosixFileAttributeView} 84 * interface extends {@code BasicFileAttributeView} by defining methods 85 * to access the file attributes commonly used by file systems and operating systems 86 * that implement the Portable Operating System Interface (POSIX) family of 87 * standards. 88 * 89 * <p> The {@link java.nio.file.attribute.DosFileAttributeView} 90 * class extends {@code BasicFileAttributeView} by defining methods to 91 * access the legacy "DOS" file attributes supported on file systems such as File 92 * Allocation Tabl (FAT), commonly used in consumer devices. 93 * 94 * <p> The {@link java.nio.file.attribute.AclFileAttributeView} 95 * class defines methods to read and write the Access Control List (ACL) 96 * file attribute. The ACL model used by this file attribute view is based 97 * on the model defined by <a href="http://www.ietf.org/rfc/rfc3530.txt"> 98 * <i>RFC 3530: Network File System (NFS) version 4 Protocol</i></a>. 99 * 100 * <p> In addition to attribute views, this package also defines classes and 101 * interfaces that are used when accessing attributes: 102 * 103 * <ul> 104 * 105 * <li> The {@link java.nio.file.attribute.UserPrincipal} and 106 * {@link java.nio.file.attribute.GroupPrincipal} interfaces represent an 107 * identity or group identity. </li> 108 * 109 * <li> The {@link java.nio.file.attribute.UserPrincipalLookupService} 110 * interface defines methods to lookup user or group principals. </li> 111 * 112 * <li> The {@link java.nio.file.attribute.FileAttribute} interface 113 * represents the value of an attribute for cases where the attribute value is 114 * required to be set atomically when creating an object in the file system. </li> 115 * 116 * </ul> 117 * 118 * 119 * <p> Unless otherwise noted, passing a {@code null} argument to a constructor 120 * or method in any class or interface in this package will cause a {@link 121 * java.lang.NullPointerException NullPointerException} to be thrown. 122 * 123 * @since 1.7 124 */ 125 126 package java.nio.file.attribute;