src/jdk.jpackage/share/classes/jdk/jpackage/internal/IOUtils.java
branchJDK-8200758-branch
changeset 57407 2c14fbeff1dc
parent 57391 970f28090a06
child 57438 4a31db8d42bd
equal deleted inserted replaced
57405:539d8b3f9e1e 57407:2c14fbeff1dc
   278         result.clear();
   278         result.clear();
   279         result.addAll(list);
   279         result.addAll(list);
   280 
   280 
   281         return ret;
   281         return ret;
   282     }
   282     }
       
   283 
       
   284     static void writableOutputDir(Path outdir) throws PackagerException {
       
   285         File file = outdir.toFile();
       
   286 
       
   287         if (!file.isDirectory() && !file.mkdirs()) {
       
   288             throw new PackagerException("error.cannot-create-output-dir",
       
   289                     file.getAbsolutePath());
       
   290         }
       
   291         if (!file.canWrite()) {
       
   292             throw new PackagerException("error.cannot-write-to-output-dir",
       
   293                     file.getAbsolutePath());
       
   294         }
       
   295     }
   283 }
   296 }