public NodePath(Path path, Environment environment) throws IOException {
   this.path = path;
   this.indicesPath = path.resolve(INDICES_FOLDER);
   this.fileStore = environment.getFileStore(path);
   if (fileStore.supportsFileAttributeView("lucene")) {
     this.spins = (Boolean) fileStore.getAttribute("lucene:spins");
   } else {
     this.spins = null;
   }
 }
Esempio n. 2
0
 private ArrayList<Path> holeLaufwerkeUnix() {
   ArrayList<Path> laufwerksRoot = new ArrayList<>();
   for (FileStore store : FileSystems.getDefault().getFileStores()) {
     if (store.name().contains("/dev/sd")) {
       laufwerksRoot.add(
           Paths.get(store.toString().substring(0, store.toString().indexOf(' '))));
     }
   }
   return laufwerksRoot;
 }