获取文件属性图
/** from NowJava.com - 时 代 Java**/ import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.util.Map; import java.util.Set; public class Main { public static void main(String[] args) throws Exception { Path path = Paths.get("/home/docs/users.txt"); Map<String, Object> attrsMap = Files.readAttributes(path, "*"); Set<String> keys = attrsMap.keySet(); for (String attribute : keys) {