< prev index next >

src/java.base/share/classes/java/nio/file/attribute/BasicFileAttributeView.java

Print this page




  24  */
  25 
  26 package java.nio.file.attribute;
  27 
  28 import java.io.IOException;
  29 
  30 /**
  31  * A file attribute view that provides a view of a <em>basic set</em> of file
  32  * attributes common to many file systems. The basic set of file attributes
  33  * consist of <em>mandatory</em> and <em>optional</em> file attributes as
  34  * defined by the {@link BasicFileAttributes} interface.
  35 
  36  * <p> The file attributes are retrieved from the file system as a <em>bulk
  37  * operation</em> by invoking the {@link #readAttributes() readAttributes} method.
  38  * This class also defines the {@link #setTimes setTimes} method to update the
  39  * file's time attributes.
  40  *
  41  * <p> Where dynamic access to file attributes is required, the attributes
  42  * supported by this attribute view have the following names and types:
  43  * <blockquote>
  44  *  <table border="1" cellpadding="8" summary="Supported attributes">


  45  *   <tr>
  46  *     <th> Name </th>
  47  *     <th> Type </th>
  48  *   </tr>


  49  *  <tr>
  50  *     <td> "lastModifiedTime" </td>
  51  *     <td> {@link FileTime} </td>
  52  *   </tr>
  53  *   <tr>
  54  *     <td> "lastAccessTime" </td>
  55  *     <td> {@link FileTime} </td>
  56  *   </tr>
  57  *   <tr>
  58  *     <td> "creationTime" </td>
  59  *     <td> {@link FileTime} </td>
  60  *   </tr>
  61  *   <tr>
  62  *     <td> "size" </td>
  63  *     <td> {@link Long} </td>
  64  *   </tr>
  65  *   <tr>
  66  *     <td> "isRegularFile" </td>
  67  *     <td> {@link Boolean} </td>
  68  *   </tr>
  69  *   <tr>
  70  *     <td> "isDirectory" </td>
  71  *     <td> {@link Boolean} </td>
  72  *   </tr>
  73  *   <tr>
  74  *     <td> "isSymbolicLink" </td>
  75  *     <td> {@link Boolean} </td>
  76  *   </tr>
  77  *   <tr>
  78  *     <td> "isOther" </td>
  79  *     <td> {@link Boolean} </td>
  80  *   </tr>
  81  *   <tr>
  82  *     <td> "fileKey" </td>
  83  *     <td> {@link Object} </td>
  84  *   </tr>

  85  * </table>
  86  * </blockquote>
  87  *
  88  * <p> The {@link java.nio.file.Files#getAttribute getAttribute} method may be
  89  * used to read any of these attributes as if by invoking the {@link
  90  * #readAttributes() readAttributes()} method.
  91  *
  92  * <p> The {@link java.nio.file.Files#setAttribute setAttribute} method may be
  93  * used to update the file's last modified time, last access time or create time
  94  * attributes as if by invoking the {@link #setTimes setTimes} method.
  95  *
  96  * @since 1.7
  97  */
  98 
  99 public interface BasicFileAttributeView
 100     extends FileAttributeView
 101 {
 102     /**
 103      * Returns the name of the attribute view. Attribute views of this type
 104      * have the name {@code "basic"}.




  24  */
  25 
  26 package java.nio.file.attribute;
  27 
  28 import java.io.IOException;
  29 
  30 /**
  31  * A file attribute view that provides a view of a <em>basic set</em> of file
  32  * attributes common to many file systems. The basic set of file attributes
  33  * consist of <em>mandatory</em> and <em>optional</em> file attributes as
  34  * defined by the {@link BasicFileAttributes} interface.
  35 
  36  * <p> The file attributes are retrieved from the file system as a <em>bulk
  37  * operation</em> by invoking the {@link #readAttributes() readAttributes} method.
  38  * This class also defines the {@link #setTimes setTimes} method to update the
  39  * file's time attributes.
  40  *
  41  * <p> Where dynamic access to file attributes is required, the attributes
  42  * supported by this attribute view have the following names and types:
  43  * <blockquote>
  44  *  <table class="striped">
  45  *  <caption style="display:none">Supported attributes</caption>
  46  *  <thead>
  47  *   <tr>
  48  *     <th> Name </th>
  49  *     <th> Type </th>
  50  *   </tr>
  51  *  </thead>
  52  *  <tbody>
  53  *  <tr>
  54  *     <td> "lastModifiedTime" </td>
  55  *     <td> {@link FileTime} </td>
  56  *   </tr>
  57  *   <tr>
  58  *     <td> "lastAccessTime" </td>
  59  *     <td> {@link FileTime} </td>
  60  *   </tr>
  61  *   <tr>
  62  *     <td> "creationTime" </td>
  63  *     <td> {@link FileTime} </td>
  64  *   </tr>
  65  *   <tr>
  66  *     <td> "size" </td>
  67  *     <td> {@link Long} </td>
  68  *   </tr>
  69  *   <tr>
  70  *     <td> "isRegularFile" </td>
  71  *     <td> {@link Boolean} </td>
  72  *   </tr>
  73  *   <tr>
  74  *     <td> "isDirectory" </td>
  75  *     <td> {@link Boolean} </td>
  76  *   </tr>
  77  *   <tr>
  78  *     <td> "isSymbolicLink" </td>
  79  *     <td> {@link Boolean} </td>
  80  *   </tr>
  81  *   <tr>
  82  *     <td> "isOther" </td>
  83  *     <td> {@link Boolean} </td>
  84  *   </tr>
  85  *   <tr>
  86  *     <td> "fileKey" </td>
  87  *     <td> {@link Object} </td>
  88  *   </tr>
  89  * </tbody>
  90  * </table>
  91  * </blockquote>
  92  *
  93  * <p> The {@link java.nio.file.Files#getAttribute getAttribute} method may be
  94  * used to read any of these attributes as if by invoking the {@link
  95  * #readAttributes() readAttributes()} method.
  96  *
  97  * <p> The {@link java.nio.file.Files#setAttribute setAttribute} method may be
  98  * used to update the file's last modified time, last access time or create time
  99  * attributes as if by invoking the {@link #setTimes setTimes} method.
 100  *
 101  * @since 1.7
 102  */
 103 
 104 public interface BasicFileAttributeView
 105     extends FileAttributeView
 106 {
 107     /**
 108      * Returns the name of the attribute view. Attribute views of this type
 109      * have the name {@code "basic"}.


< prev index next >