コード例 #1
0
  public static void main(String[] args) {
    Path path = Paths.get("/home/docs/users.txt");
    FileSystem fileSystem = path.getFileSystem();
    Set<String> supportedViews = fileSystem.supportedFileAttributeViews();

    for (String view : supportedViews) {
      logger.debug(view);
    }
  }
コード例 #2
0
 @SuppressForbidden(reason = "sets java.io.tmpdir")
 public InstallPluginCommandTests(FileSystem fs, Function<String, Path> temp) {
   this.fs = fs;
   this.temp = temp;
   this.isPosix = fs.supportedFileAttributeViews().contains("posix");
   this.isReal = fs == PathUtils.getDefaultFileSystem();
   PathUtilsForTesting.installMock(fs);
   javaIoTmpdir = System.getProperty("java.io.tmpdir");
   System.setProperty("java.io.tmpdir", temp.apply("tmpdir").toString());
 }