提交 695b4e15 编写于 作者: A alanb

6867781: (file) Examples in javadoc use newFileAttributeView instead of getFileAttributeView

Reviewed-by: sherman
上级 0587dc28
......@@ -75,7 +75,7 @@ import java.io.IOException;
* .lookupPrincipalByName("joe");
*
* // get view
* AclFileAttributeView view = file.newFileAttributeView(AclFileAttributeView.class);
* AclFileAttributeView view = file.getFileAttributeView(AclFileAttributeView.class);
*
* // create ACE to give "joe" read access
* AclEntry entry = AclEntry.newBuilder()
......
......@@ -61,7 +61,7 @@ import java.io.IOException;
* Suppose we need to print out the owner and access permissions of a file:
* <pre>
* FileRef file = ...
* PosixFileAttributes attrs = file.newFileAttributeView(PosixFileAttributeView.class)
* PosixFileAttributes attrs = file.getFileAttributeView(PosixFileAttributeView.class)
* .readAttributes();
* System.out.format("%s %s%n",
* attrs.owner().getName(),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册