@Override public Set<String> supportedFileAttributeViews() { checkClosed(); return SUPPORTED_ATTR_VIEWS; }
@Override public UserPrincipalLookupService getUserPrincipalLookupService() throws UnsupportedOperationException { checkClosed(); throw new UnsupportedOperationException(); }
@Override public Iterable<FileStore> getFileStores() { checkClosed(); return () -> new Iterator<FileStore>() { private int i = 0; @Override public boolean hasNext() { return i < 1; } @Override public FileStore next() { if (i < 1) { i++; return fileStore; } else { throw new NoSuchElementException(); } } @Override public void remove() { throw new UnsupportedOperationException(); } }; }
@Override public PathMatcher getPathMatcher(final String syntaxAndPattern) throws IllegalArgumentException, PatternSyntaxException, UnsupportedOperationException { checkClosed(); checkNotEmpty("syntaxAndPattern", syntaxAndPattern); throw new UnsupportedOperationException(); }
@Override public WatchService newWatchService() throws UnsupportedOperationException, IOException { checkClosed(); return fsEventsManager.newWatchService(name); }
@Override public Iterable<Path> getRootDirectories() { checkClosed(); return () -> new Iterator<Path>() {
@Override public Path getPath(final String first, final String... more) throws InvalidPathException { checkClosed(); if (first == null || first.trim().isEmpty()) { return new JGitFSPath(this); } if (more == null || more.length == 0) { return JGitPathImpl.create(this, first, JGitPathImpl.DEFAULT_REF_TREE + "@" + name, false); } final StringBuilder sb = new StringBuilder(); for (final String segment : more) { if (segment.length() > 0) { if (sb.length() > 0) { sb.append(getSeparator()); } sb.append(segment); } } return JGitPathImpl.create(this, sb.toString(), first + "@" + name, false); }