Exemplo n.º 1
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;
 }
Exemplo n.º 2
0
 public void doit(String archiveFilename) {
   f.clear();
   try {
     tar = new TarInputStream(new GZIPInputStream(new FileInputStream(archiveFilename)));
     while ((current = tar.getNextEntry()) != null) {
       System.err.println("ok:" + current.getName());
       long s = current.getSize();
       if (!current.isDirectory()) {
         // System.err.println(current.getFile());
         f.prepareForBulkInsert(tar, current.getName());
       }
     }
   } catch (Exception e) {
     e.printStackTrace();
   }
   f.flushFiles();
 }