Java FileStore check if file attribute support AclFileAttributeView
import java.io.IOException; import java.nio.file.FileStore; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.nio.file.attribute.AclFileAttributeView; import java.nio.file.attribute.FileAttributeView; public class Main { public static void main(String[] args) { Path path = Paths.get("C:/Java_dev"); try {//from www . j a v a2 s . c o m FileStore fs = Files.getFileStore(path); Class<? extends FileAttributeView> attribClass = AclFileAttributeView.class; // Check if the file attribute view is supported boolean supported = fs.supportsFileAttributeView(attribClass); System.out.format("%s is supported: %s%n", attribClass.getSimpleName(), supported); } catch (IOException ex) { ex.printStackTrace(); } } }