|
1 /* |
|
2 * Copyright 2007-2009 Sun Microsystems, Inc. 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. Sun designates this |
|
8 * particular file as subject to the "Classpath" exception as provided |
|
9 * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, |
|
22 * CA 95054 USA or visit www.sun.com if you need additional information or |
|
23 * have any questions. |
|
24 */ |
|
25 |
|
26 /** |
|
27 * Interfaces and classes providing access to file and file system attributes. |
|
28 * |
|
29 * <blockquote><table cellspacing=1 cellpadding=0 summary="Attribute views"> |
|
30 * <tr><th><p align="left">Attribute views</p></th><th><p align="left">Description</p></th></tr> |
|
31 * <tr><td valign=top><tt><i>{@link java.nio.file.attribute.AttributeView}</i></tt></td> |
|
32 * <td>Can read or update non-opaque values associated with objects in a file system</td></tr> |
|
33 * <tr><td valign=top><tt> <i>{@link java.nio.file.attribute.FileAttributeView}</i></tt></td> |
|
34 * <td>Can read or update file attributes</td></tr> |
|
35 * <tr><td valign=top><tt> <i>{@link java.nio.file.attribute.BasicFileAttributeView} </i></tt></td> |
|
36 * <td>Can read or update a basic set of file attributes</td></tr> |
|
37 * <tr><td valign=top><tt> <i>{@link java.nio.file.attribute.PosixFileAttributeView} </i></tt></td> |
|
38 * <td>Can read or update POSIX defined file attributes</td></tr> |
|
39 * <tr><td valign=top><tt> <i>{@link java.nio.file.attribute.DosFileAttributeView} </i></tt></td> |
|
40 * <td>Can read or update FAT file attributes</td></tr> |
|
41 * <tr><td valign=top><tt>  <i>{@link java.nio.file.attribute.FileOwnerAttributeView} </i></tt></td> |
|
42 * <td>Can read or update the owner of a file</td></tr> |
|
43 * <tr><td valign=top><tt> <i>{@link java.nio.file.attribute.AclFileAttributeView} </i></tt></td> |
|
44 * <td>Can read or update Access Control Lists</td></tr> |
|
45 * <tr><td valign=top><tt> <i>{@link java.nio.file.attribute.UserDefinedFileAttributeView} </i></tt></td> |
|
46 * <td>Can read or update user-defined file attributes</td></tr> |
|
47 * <tr><td valign=top><tt> <i>{@link java.nio.file.attribute.FileStoreAttributeView}</i></tt></td> |
|
48 * <td>Can read or update file system attributes</td></tr> |
|
49 * <tr><td valign=top><tt> <i>{@link java.nio.file.attribute.FileStoreSpaceAttributeView} </i></tt></td> |
|
50 * <td>Can read file system <em>space usage</em> related attributes</td></tr> |
|
51 * </table></blockquote> |
|
52 * |
|
53 * <p> An attribute view provides a read-only or updatable view of the non-opaque |
|
54 * values, or <em>metadata</em>, associated with objects in a file system. |
|
55 * The {@link java.nio.file.attribute.FileAttributeView} interface is |
|
56 * extended by several other interfaces that that views to specific sets of file |
|
57 * attributes. {@code FileAttributeViews} are selected by invoking the {@link |
|
58 * java.nio.file.FileRef#getFileAttributeView} method with a |
|
59 * <em>type-token</em> to identify the required view. Views can also be identified |
|
60 * by name. The {@link java.nio.file.attribute.FileStoreAttributeView} interface |
|
61 * provides access to file store attributes. A {@code FileStoreAttributeView} of |
|
62 * a given type is obtained by invoking the {@link |
|
63 * java.nio.file.FileStore#getFileStoreAttributeView} method. |
|
64 * |
|
65 * <p> The {@link java.nio.file.attribute.BasicFileAttributeView} |
|
66 * class defines methods to read and update a <em>basic</em> set of file |
|
67 * attributes that are common to many file systems. |
|
68 * |
|
69 * <p> The {@link java.nio.file.attribute.PosixFileAttributeView} |
|
70 * interface extends {@code BasicFileAttributeView} by defining methods |
|
71 * to access the file attributes commonly used by file systems and operating systems |
|
72 * that implement the Portable Operating System Interface (POSIX) family of |
|
73 * standards. |
|
74 * |
|
75 * <p> The {@link java.nio.file.attribute.DosFileAttributeView} |
|
76 * class extends {@code BasicFileAttributeView} by defining methods to |
|
77 * access the legacy "DOS" file attributes supported on file systems such as File |
|
78 * Allocation Tabl (FAT), commonly used in consumer devices. |
|
79 * |
|
80 * <p> The {@link java.nio.file.attribute.AclFileAttributeView} |
|
81 * class defines methods to read and write the Access Control List (ACL) |
|
82 * file attribute. The ACL model used by this file attribute view is based |
|
83 * on the model defined by <a href="http://www.ietf.org/rfc/rfc3530.txt"> |
|
84 * <i>RFC 3530: Network File System (NFS) version 4 Protocol</i></a>. |
|
85 * |
|
86 * <p> The {@link java.nio.file.attribute.FileStoreSpaceAttributeView} class |
|
87 * defines methods to read file system space usage related attributes of a file system. |
|
88 * |
|
89 * <p> The {@link java.nio.file.attribute.Attributes} utility class defines |
|
90 * static methods to access file or file system attribute using the above |
|
91 * attribute views. |
|
92 * |
|
93 * <p> In addition to attribute views, this package also defines classes and |
|
94 * interfaces that are used when accessing attributes: |
|
95 * |
|
96 * <ul> |
|
97 * |
|
98 * <p><li> The {@link java.nio.file.attribute.UserPrincipal} and |
|
99 * {@link java.nio.file.attribute.GroupPrincipal} interfaces represent an |
|
100 * identity or group identity. </li> |
|
101 * |
|
102 * <p><li> The {@link java.nio.file.attribute.UserPrincipalLookupService} |
|
103 * interface defines methods to lookup user or group principals. </li> |
|
104 * |
|
105 * <p><li> The {@link java.nio.file.attribute.Attribute} interface |
|
106 * represents the value of an attribute for cases where the attribute value is |
|
107 * require to be set atomically when creating an object in the file system. </li> |
|
108 * |
|
109 * </ul> |
|
110 * |
|
111 * |
|
112 * <p> Unless otherwise noted, passing a <tt>null</tt> argument to a constructor |
|
113 * or method in any class or interface in this package will cause a {@link |
|
114 * java.lang.NullPointerException NullPointerException} to be thrown. |
|
115 * |
|
116 * @since 1.7 |
|
117 */ |
|
118 |
|
119 package java.nio.file.attribute; |