检查特定文件所在的文件存储是否支持单个视图
import java.io.IOException; import java.nio.file.FileStore; import java.nio.file.Files; import java.nio.file.Path;/*来 自 n o w j a v a . c o m - 时 代 Java*/ import java.nio.file.Paths; public class Main { public static void main(String[] args) { Path path = Paths.get("C:/folder1/folder2/folder4", "test.txt"); try { FileStore store = Files.getFileStore(path); boolean supported = store.supportsFileAttributeView("basic"); System.out.println(store.name() + " ---"