Get supported attribute views for your system in Java
Description
The following code shows how to get supported attribute views for your system.
Example
/*from w w w. jav a2 s . co m*/
import java.nio.file.FileSystem;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Set;
public class Main {
public static void main(String[] args) {
Path path = Paths.get("C:/home/docs/users.txt");
FileSystem fileSystem = path.getFileSystem();
Set<String> supportedViews = fileSystem.supportedFileAttributeViews();
for (String view : supportedViews) {
System.out.println(view);
}
}
}
The code above generates the following result.