@Override public Object getAttribute(final String attribute) throws UnsupportedOperationException, IOException { checkNotEmpty("attribute", attribute); if (attribute.equals("totalSpace")) { return getTotalSpace(); } if (attribute.equals("usableSpace")) { return getUsableSpace(); } if (attribute.equals("readOnly")) { return isReadOnly(); } if (attribute.equals("name")) { return name(); } throw new UnsupportedOperationException("Attribute '" + attribute + "' not available"); }
@Override public int hashCode() { return name().hashCode(); } }
credential); this.fsHooks = fsHooks; this.fileStore = new JGitFileStore(this.git.getRepository()); if (fullHostNames != null && !fullHostNames.isEmpty()) { final StringBuilder sb = new StringBuilder();
@Override public int hashCode() { return name().hashCode(); } }
JGitFileSystem(final FileSystemProvider provider, final Git git, final String name, final ListBranchCommand.ListMode listMode) { this.provider = checkNotNull("provider", provider); this.gitRepo = checkNotNull("git", git); this.name = checkNotEmpty("name", name); this.listMode = listMode; this.fileStore = new JGitFileStore(gitRepo.getRepository()); }
@Override public Object getAttribute(final String attribute) throws UnsupportedOperationException, IOException { checkNotEmpty("attribute", attribute); if (attribute.equals("totalSpace")) { return getTotalSpace(); } if (attribute.equals("usableSpace")) { return getUsableSpace(); } if (attribute.equals("readOnly")) { return isReadOnly(); } if (attribute.equals("name")) { return name(); } throw new UnsupportedOperationException("Attribute '" + attribute + "' not available"); }
@Override public boolean equals(final Object o) { if (o == null) { return false; } if (!(o instanceof FileStore)) { return false; } final FileStore ofs = (FileStore) o; return name().equals(ofs.name()); }
@Override public FileStore getFileStore(final Path path) throws IOException, SecurityException { checkNotNull("path", path); return new JGitFileStore(toPathImpl(path).getFileSystem().getGit().getRepository()); }
@Override public boolean equals(final Object o) { if (o == null) { return false; } if (!(o instanceof FileStore)) { return false; } final FileStore ofs = (FileStore) o; return name().equals(ofs.name()); }
@Override public FileStore getFileStore(final Path path) throws IOException, SecurityException { checkNotNull("path", path); return new JGitFileStore(toPathImpl(path).getFileSystem().gitRepo().getRepository()); }