List of usage examples for java.nio.file FileSystems newFileSystem
public static FileSystem newFileSystem(Path path, Map<String, ?> env, ClassLoader loader) throws IOException
From source file:org.nuxeo.ecm.webengine.gwt.GwtResolver.java
protected File install(URI location) throws IOException { if ("jar".equals(location.getScheme())) { Map<String, Object> env = Collections.emptyMap(); try (FileSystem fileSystem = FileSystems.newFileSystem(location, env, this.getClass().getClassLoader());) { Path path = Paths.get(location); try { // it's a directory return path.toFile(); } catch (UnsupportedOperationException cause) { // it's a jar, we should install content }//from www .ja v a2 s.c om Files.walkFileTree(path, new TreeImporter(path, GWT_ROOT.toPath())); return GWT_ROOT; } } return Paths.get(location).toFile(); }