src/share/classes/java/nio/file/attribute/PosixFileAttributeView.java

Print this page

        

@@ -58,12 +58,12 @@
  * but access to these other bits is not defined by this class in this release.
  *
  * <p> <b>Usage Example:</b>
  * Suppose we need to print out the owner and access permissions of a file:
  * <pre>
- *     FileRef file = ...
- *     PosixFileAttributes attrs = file.getFileAttributeView(PosixFileAttributeView.class)
+ *     Path file = ...
+ *     PosixFileAttributes attrs = Files.getFileAttributeView(file, PosixFileAttributeView.class)
  *         .readAttributes();
  *     System.out.format("%s %s%n",
  *         attrs.owner().getName(),
  *         PosixFilePermissions.toString(attrs.permissions()));
  * </pre>

@@ -88,27 +88,27 @@
  *     <td> {@link GroupPrincipal} </td>
  *   </tr>
  * </table>
  * </blockquote>
  *
- * <p> The {@link FileRef#getAttribute getAttribute} method may be used to read
+ * <p> The {@link Files#getAttribute getAttribute} method may be used to read
  * any of these attributes, or any of the attributes defined by {@link
  * BasicFileAttributeView} as if by invoking the {@link #readAttributes
  * readAttributes()} method.
  *
- * <p> The {@link FileRef#setAttribute setAttribute} method may be used to update
+ * <p> The {@link Files#setAttribute setAttribute} method may be used to update
  * the file's last modified time, last access time or create time attributes as
  * defined by {@link BasicFileAttributeView}. It may also be used to update
  * the permissions, owner, or group-owner as if by invoking the {@link
  * #setPermissions setPermissions}, {@link #setOwner setOwner}, and {@link
  * #setGroup setGroup} methods respectively.
  *
  * <h4> Setting Initial Permissions </h4>
  * <p> Implementations supporting this attribute view may also support setting
  * the initial permissions when creating a file or directory. The
- * initial permissions are provided to the  {@link Path#createFile createFile}
- * or {@link Path#createDirectory createDirectory} methods as a {@link
+ * initial permissions are provided to the {@link Files#createFile createFile}
+ * or {@link Files#createDirectory createDirectory} methods as a {@link
  * FileAttribute} with {@link FileAttribute#name name} {@code "posix:permissions"}
  * and a {@link FileAttribute#value value} that is the set of permissions. The
  * following example uses the {@link PosixFilePermissions#asFileAttribute
  * asFileAttribute} method to construct a {@code FileAttribute} when creating a
  * file:

@@ -115,11 +115,11 @@
  *
  * <pre>
  *     Path path = ...
  *     Set&lt;PosixFilePermission&gt; perms =
  *         EnumSet.of(OWNER_READ, OWNER_WRITE, OWNER_EXECUTE, GROUP_READ);
- *     path.createFile(PosixFilePermissions.asFileAttribute(perms));
+ *     Files.createFile(path, PosixFilePermissions.asFileAttribute(perms));
  * </pre>
  *
  * <p> When the access permissions are set at file creation time then the actual
  * value of the permissions may differ that the value of the attribute object.
  * The reasons for this are implementation specific. On UNIX systems, for

@@ -126,17 +126,15 @@
  * example, a process has a <em>umask</em> that impacts the permission bits
  * of newly created files. Where an implementation supports the setting of
  * the access permissions, and the underlying file system supports access
  * permissions, then it is required that the value of the actual access
  * permissions will be equal or less than the value of the attribute
- * provided to the {@link java.nio.file.Path#createFile createFile} or
- * {@link java.nio.file.Path#createDirectory createDirectory} methods. In
- * other words, the file may be more secure than requested.
+ * provided to the {@link Files#createFile createFile} or {@link
+ * Files#createDirectory createDirectory} methods. In other words, the file may
+ * be more secure than requested.
  *
  * @since 1.7
- *
- * @see Attributes#readPosixFileAttributes
  */
 
 public interface PosixFileAttributeView
     extends BasicFileAttributeView, FileOwnerAttributeView
 {