< prev index next >

src/java.base/share/classes/java/nio/file/attribute/package-info.java

Print this page


   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  *     &nbsp;&nbsp;<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  *     &nbsp;&nbsp;&nbsp;&nbsp;
  40  *     <i>{@link java.nio.file.attribute.BasicFileAttributeView}&nbsp;&nbsp;</i></td>
  41  *     <td>Can read or update a basic set of file attributes</td></tr>
  42  * <tr><td style="vertical-align:top">
  43  *     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  44  *     <i>{@link java.nio.file.attribute.PosixFileAttributeView}&nbsp;&nbsp;</i></td>
  45  *     <td>Can read or update POSIX defined file attributes</td></tr>
  46  * <tr><td style="vertical-align:top">
  47  *     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  48  *     <i>{@link java.nio.file.attribute.DosFileAttributeView}&nbsp;&nbsp;</i></td>
  49  *     <td>Can read or update FAT file attributes</td></tr>
  50  * <tr><td style="vertical-align:top">
  51  *     &nbsp;&nbsp;&nbsp;&nbsp;
  52  *     <i>{@link java.nio.file.attribute.FileOwnerAttributeView}&nbsp;&nbsp;</i></td>
  53  *     <td>Can read or update the owner of a file</td></tr>
  54  * <tr><td style="vertical-align:top">
  55  *     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  56  *     <i>{@link java.nio.file.attribute.AclFileAttributeView}&nbsp;&nbsp;</i></td>
  57  *     <td>Can read or update Access Control Lists</td></tr>
  58  * <tr><td style="vertical-align:top">
  59  *     &nbsp;&nbsp;&nbsp;&nbsp;
  60  *     <i>{@link java.nio.file.attribute.UserDefinedFileAttributeView}&nbsp;&nbsp;</i></td>
  61  *     <td>Can read or update user-defined file attributes</td></tr>
  62  * <tr><td style="vertical-align:top">
  63  *     &nbsp;&nbsp;<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


   1 /*
   2  * Copyright (c) 2007, 2017, 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  * <table class="striped" style="padding-left:2em; text-align:left">
  30  *     <caption style="display:none">Attribute views</caption>
  31  * <thead>
  32  * <tr><th scope="col">Attribute views</th>
  33  *     <th scope="col">Description</th></tr>
  34  * </thead>
  35  * <tbody>
  36  * <tr><th scope="row"><i>{@link java.nio.file.attribute.AttributeView}</i></th>
  37  *     <td>Can read or update non-opaque values associated with objects in a file system</td></tr>
  38  * <tr><th scope="row">
  39  *     <span style="padding-left:1em"><i>{@link java.nio.file.attribute.FileAttributeView}</i></span></th>
  40  *     <td>Can read or update file attributes</td></tr>
  41  * <tr><th scope="row">
  42  *     <span style="padding-left:2em">
  43  *     <i>{@link java.nio.file.attribute.BasicFileAttributeView}</i></span></th>
  44  *     <td>Can read or update a basic set of file attributes</td></tr>
  45  * <tr><th scope="row">
  46  *     <span style="padding-left:3em">
  47  *     <i>{@link java.nio.file.attribute.PosixFileAttributeView}</i></span></th>
  48  *     <td>Can read or update POSIX defined file attributes</td></tr>
  49  * <tr><th scope="row">
  50  *     <span style="padding-left:3em">
  51  *     <i>{@link java.nio.file.attribute.DosFileAttributeView}</i></span></th>
  52  *     <td>Can read or update FAT file attributes</td></tr>
  53  * <tr><th scope="row">
  54  *     <span style="padding-left:2em">
  55  *     <i>{@link java.nio.file.attribute.FileOwnerAttributeView}</i></span></th>
  56  *     <td>Can read or update the owner of a file</td></tr>
  57  * <tr><th scope="row">
  58  *     <span style="padding-left:3em">
  59  *     <i>{@link java.nio.file.attribute.AclFileAttributeView}</i></span></th>
  60  *     <td>Can read or update Access Control Lists</td></tr>
  61  * <tr><th scope="row">
  62  *     <span style="padding-left:2em">
  63  *     <i>{@link java.nio.file.attribute.UserDefinedFileAttributeView}</i></span></th>
  64  *     <td>Can read or update user-defined file attributes</td></tr>
  65  * <tr><th scope="row">
  66  *     <span style="padding-left:1em"><i>{@link java.nio.file.attribute.FileStoreAttributeView}</i></span></th>
  67  *     <td>Can read or update file system attributes</td></tr>
  68  * </tbody>
  69  * </table>
  70  *
  71  * <p> An attribute view provides a read-only or updatable view of the non-opaque
  72  * values, or <em>metadata</em>, associated with objects in a file system.
  73  * The {@link java.nio.file.attribute.FileAttributeView} interface is
  74  * extended by several other interfaces that provide views to specific sets of file
  75  * attributes. {@code FileAttributeViews} are selected by invoking the {@link
  76  * java.nio.file.Files#getFileAttributeView} method with a
  77  * <em>type-token</em> to identify the required view. Views can also be identified
  78  * by name. The {@link java.nio.file.attribute.FileStoreAttributeView} interface
  79  * provides access to file store attributes. A {@code FileStoreAttributeView} of
  80  * a given type is obtained by invoking the {@link
  81  * java.nio.file.FileStore#getFileStoreAttributeView} method.
  82  *
  83  * <p> The {@link java.nio.file.attribute.BasicFileAttributeView}
  84  * class defines methods to read and update a <em>basic</em> set of file
  85  * attributes that are common to many file systems.
  86  *
  87  * <p> The {@link java.nio.file.attribute.PosixFileAttributeView}
  88  * interface extends {@code BasicFileAttributeView} by defining methods
  89  * to access the file attributes commonly used by file systems and operating systems


< prev index next >