您还可以使用getAttribute()方法读取ACL:
import java.io.IOException; import java.nio.file.Files; import java.nio.file.LinkOption; /**来自 时代Java - nowjava.com**/ import java.nio.file.Path; import java.nio.file.Paths; import java.nio.file.attribute.AclEntry; import java.util.List; public class Main { public static void main(String[] args) { List<AclEntry> acllist = null; Path path = Paths.get("C:/folder1/folder2/folder4", "test.txt"); /* 来自 N o w J a v a . c o m*/ try { acllist = (List<AclEntry>) Files.getAttribute(path,