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 { | 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 scope="col"> Name </th> 49 * <th scope="col"> Type </th> 50 * </tr> 51 * </thead> 52 * <tbody> 53 * <tr> 54 * <th scope="row"> "lastModifiedTime" </th> 55 * <td> {@link FileTime} </td> 56 * </tr> 57 * <tr> 58 * <th scope="row"> "lastAccessTime" </th> 59 * <td> {@link FileTime} </td> 60 * </tr> 61 * <tr> 62 * <th scope="row"> "creationTime" </th> 63 * <td> {@link FileTime} </td> 64 * </tr> 65 * <tr> 66 * <th scope="row"> "size" </th> 67 * <td> {@link Long} </td> 68 * </tr> 69 * <tr> 70 * <th scope="row"> "isRegularFile" </th> 71 * <td> {@link Boolean} </td> 72 * </tr> 73 * <tr> 74 * <th scope="row"> "isDirectory" </th> 75 * <td> {@link Boolean} </td> 76 * </tr> 77 * <tr> 78 * <th scope="row"> "isSymbolicLink" </th> 79 * <td> {@link Boolean} </td> 80 * </tr> 81 * <tr> 82 * <th scope="row"> "isOther" </th> 83 * <td> {@link Boolean} </td> 84 * </tr> 85 * <tr> 86 * <th scope="row"> "fileKey" </th> 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 { |