Determining operating system support for attribute views - Java File Path IO

Java examples for File Path IO:File Attribute

Description

Determining operating system support for attribute views

Demo Code

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);//  w  w w. j ava2 s .  c  om
    }
  }
}

Related Tutorials