@Override public String getIdentifier() { return getUri(); }
private FileSystem createFileSystem(final GitRepository repo) { FileSystem fs = null; URI uri = null; try { uri = URI.create(repo.getUri()); fs = newFileSystem(uri); } catch (final FileSystemAlreadyExistsException e) { fs = ioService.getFileSystem(uri); Object replaceIfExists = repo.getEnvironment().get("replaceIfExists"); if (replaceIfExists != null && Boolean.valueOf(replaceIfExists.toString())) { org.uberfire.java.nio.file.Path root = fs.getPath(null); ioService.delete(root); fs = newFileSystem(uri); } } catch (final Throwable ex) { throw new RuntimeException(ex.getCause().getMessage(), ex); } return fs; }
private FileSystem createFileSystem(final GitRepository repo) { FileSystem fs; URI uri = null; try { uri = URI.create(repo.getUri()); fs = newFileSystem(uri); } catch (final FileSystemAlreadyExistsException e) { fs = ioService.getFileSystem(uri); Object replaceIfExists = repo.getEnvironment().get("replaceIfExists"); if (replaceIfExists != null && Boolean.valueOf(replaceIfExists.toString())) { org.uberfire.java.nio.file.Path root = fs.getPath(null); ioService.delete(root); fs = newFileSystem(uri); } } catch (final Throwable ex) { throw new RuntimeException(ex); } return fs; }
URI uri = null; try { uri = URI.create( repo.getUri() ); fs = ioService.newFileSystem( uri, new HashMap<String, Object>( repo.getEnvironment() ) ); } catch ( final FileSystemAlreadyExistsException e ) {