使用Files.getFileAttributeView()读取ACL
import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path;/*from 时 代 J a v a - nowjava.com*/ import java.nio.file.Paths; import java.nio.file.attribute.AclEntry; import java.nio.file.attribute.AclFileAttributeView; 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"); AclFileAttributeView aclview = Files.getFileAttributeView(path, AclFileAttributeView.class);/*n o w j a v a . c o m - 时 代