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 the legacy "DOS" file attributes.
32 * These attributes are supported by file systems such as the File Allocation
33 * Table (FAT) format commonly used in <em>consumer devices</em>.
34 *
35 * <p> A {@code DosFileAttributeView} is a {@link BasicFileAttributeView} that
36 * additionally supports access to the set of DOS attribute flags that are used
37 * to indicate if the file is read-only, hidden, a system file, or archived.
38 *
39 * <p> Where dynamic access to file attributes is required, the attributes
40 * supported by this attribute view are as defined by {@code
41 * BasicFileAttributeView}, and in addition, the following attributes are
42 * supported:
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> readonly </td>
51 * <td> {@link Boolean} </td>
52 * </tr>
53 * <tr>
54 * <td> hidden </td>
55 * <td> {@link Boolean} </td>
56 * </tr>
57 * <tr>
58 * <td> system </td>
59 * <td> {@link Boolean} </td>
60 * </tr>
61 * <tr>
62 * <td> archive </td>
63 * <td> {@link Boolean} </td>
64 * </tr>
65 * </table>
66 * </blockquote>
67 *
68 * <p> The {@link java.nio.file.Files#getAttribute getAttribute} method may
69 * be used to read any of these attributes, or any of the attributes defined by
70 * {@link BasicFileAttributeView} as if by invoking the {@link #readAttributes
71 * readAttributes()} method.
72 *
73 * <p> The {@link java.nio.file.Files#setAttribute setAttribute} method may
74 * be used to update the file's last modified time, last access time or create
75 * time attributes as defined by {@link BasicFileAttributeView}. It may also be
76 * used to update the DOS attributes as if by invoking the {@link #setReadOnly
77 * setReadOnly}, {@link #setHidden setHidden}, {@link #setSystem setSystem}, and
78 * {@link #setArchive setArchive} methods respectively.
79 *
80 * @since 1.7
81 */
82
83 public interface DosFileAttributeView
84 extends BasicFileAttributeView
|
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 the legacy "DOS" file attributes.
32 * These attributes are supported by file systems such as the File Allocation
33 * Table (FAT) format commonly used in <em>consumer devices</em>.
34 *
35 * <p> A {@code DosFileAttributeView} is a {@link BasicFileAttributeView} that
36 * additionally supports access to the set of DOS attribute flags that are used
37 * to indicate if the file is read-only, hidden, a system file, or archived.
38 *
39 * <p> Where dynamic access to file attributes is required, the attributes
40 * supported by this attribute view are as defined by {@code
41 * BasicFileAttributeView}, and in addition, the following attributes are
42 * supported:
43 * <blockquote>
44 * <table class="altrows">
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> readonly </td>
55 * <td> {@link Boolean} </td>
56 * </tr>
57 * <tr>
58 * <td> hidden </td>
59 * <td> {@link Boolean} </td>
60 * </tr>
61 * <tr>
62 * <td> system </td>
63 * <td> {@link Boolean} </td>
64 * </tr>
65 * <tr>
66 * <td> archive </td>
67 * <td> {@link Boolean} </td>
68 * </tr>
69 * </tbody>
70 * </table>
71 * </blockquote>
72 *
73 * <p> The {@link java.nio.file.Files#getAttribute getAttribute} method may
74 * be used to read any of these attributes, or any of the attributes defined by
75 * {@link BasicFileAttributeView} as if by invoking the {@link #readAttributes
76 * readAttributes()} method.
77 *
78 * <p> The {@link java.nio.file.Files#setAttribute setAttribute} method may
79 * be used to update the file's last modified time, last access time or create
80 * time attributes as defined by {@link BasicFileAttributeView}. It may also be
81 * used to update the DOS attributes as if by invoking the {@link #setReadOnly
82 * setReadOnly}, {@link #setHidden setHidden}, {@link #setSystem setSystem}, and
83 * {@link #setArchive setArchive} methods respectively.
84 *
85 * @since 1.7
86 */
87
88 public interface DosFileAttributeView
89 extends BasicFileAttributeView
|