/** * Returns the file size in bytes (if this entry is a file). * * @deprecated use {@link #getSize()} instead * @return the size of this entry in bytes */ public long size() { return getSize(); }
/** * Returns the file size in bytes (if this entry is a file). * * @deprecated use {@link #getSize()} instead * @return the size of this entry in bytes */ public long size() { return getSize(); }
/** * Returns the file size in bytes (if this entry is a file). * * @deprecated use {@link #getSize()} instead * @return the size of this entry in bytes */ public long size() { return getSize(); }
/** * Returns the file size in bytes (if this entry is a file). * * @deprecated use {@link #getSize()} instead * @return the size of this entry in bytes */ public long size() { return getSize(); }
@Override public long size() throws SizeException { SVNDirEntry entry; try { entry = root.getRepository().info(path, -1); if (entry == null || entry.getKind() != SVNNodeKind.FILE) { throw new SizeException(this, new IOException("file expected")); } return entry.getSize(); } catch (SVNException e) { throw new SizeException(this, e); } }
@Override public long length() throws LengthException { SVNDirEntry entry; try { entry = root.getRepository().info(path, -1); if (entry == null || entry.getKind() != SVNNodeKind.FILE) { throw new LengthException(this, new IOException("file expected")); } return entry.getSize(); } catch (SVNException e) { throw new LengthException(this, e); } }
private void checkEquals(@NotNull Collection<SVNDirEntry> listA, @NotNull Collection<SVNDirEntry> listB) { final Set<String> entries = new HashSet<>(); for (SVNDirEntry entry : listA) { entries.add(entry.getName() + '\t' + entry.getKind() + '\t' + entry.getSize()); } for (SVNDirEntry entry : listB) { Assert.assertTrue(entries.remove(entry.getName() + '\t' + entry.getKind() + '\t' + entry.getSize())); } Assert.assertTrue(entries.isEmpty()); }
static SVNInfo createInfo(String path, SVNURL reposRootURL, String uuid, SVNURL url, SVNRevision revision, SVNDirEntry dirEntry, SVNLock lock) { if (dirEntry == null) { return null; } return new SVNInfo(path, url, revision, dirEntry.getKind(), uuid, reposRootURL, dirEntry.getRevision(), dirEntry.getDate(), dirEntry.getAuthor(), lock, SVNDepth.UNKNOWN, dirEntry.getSize()); }
public static SVNInfo createInfo(String path, SVNURL reposRootURL, String uuid, SVNURL url, SVNRevision revision, SVNDirEntry dirEntry, SVNLock lock) { if (dirEntry == null) { return null; } return new SVNInfo(path, url, revision, dirEntry.getKind(), uuid, reposRootURL, dirEntry.getRevision(), dirEntry.getDate(), dirEntry.getAuthor(), lock, SVNDepth.UNKNOWN, dirEntry.getSize()); }
static SVNInfo createInfo(String path, SVNURL reposRootURL, String uuid, SVNURL url, SVNRevision revision, SVNDirEntry dirEntry, SVNLock lock) { if (dirEntry == null) { return null; } return new SVNInfo(path, url, revision, dirEntry.getKind(), uuid, reposRootURL, dirEntry.getRevision(), dirEntry.getDate(), dirEntry.getAuthor(), lock, SVNDepth.UNKNOWN, dirEntry.getSize()); }
/** * @deprecated */ public long getContentLength() throws SVNException { SVNDirEntry entry = getRepository().getDir(getResourceURI().getPath(), getRevision(), false, null); return entry.getSize(); }
public void handleDirEntry(SVNDirEntry dirEntry) throws SVNException { if (entries != null) { dirEntry = new SVNDirEntry(url.appendPath(dirEntry.getName(), false), repositoryRoot, dirEntry.getName(), dirEntry.getKind(), dirEntry.getSize(), dirEntry.hasProperties(), dirEntry.getRevision(), dirEntry.getDate(), dirEntry.getAuthor()); entries.add(dirEntry); } } };
public void handleDirEntry(SVNDirEntry dirEntry) throws SVNException { dirEntry = new SVNDirEntry(url.appendPath(dirEntry.getName(), false), dirEntry.getName(), dirEntry.getKind(), dirEntry.getSize(), dirEntry.hasProperties(), dirEntry.getRevision(), dirEntry.getDate(), dirEntry.getAuthor()); entries.add(dirEntry); } };
public void handleDirEntry(SVNDirEntry dirEntry) throws SVNException { if (entries != null) { dirEntry = new SVNDirEntry(url.appendPath(dirEntry.getName(), false), repositoryRoot, dirEntry.getName(), dirEntry.getKind(), dirEntry.getSize(), dirEntry.hasProperties(), dirEntry.getRevision(), dirEntry.getDate(), dirEntry.getAuthor()); entries.add(dirEntry); } } };
public void handleDirEntry(SVNDirEntry dirEntry) throws SVNException { if (entries != null) { dirEntry = new SVNDirEntry(url.appendPath(dirEntry.getName(), false), repositoryRoot, dirEntry.getName(), dirEntry.getKind(), dirEntry.getSize(), dirEntry.hasProperties(), dirEntry.getRevision(), dirEntry.getDate(), dirEntry.getAuthor()); entries.add(dirEntry); } } };
public static DirEntry createDirEntry(SVNDirEntry dirEntry) { if(dirEntry == null){ return null; } return new DirEntry( dirEntry.getRelativePath(), getNodeKind(dirEntry.getKind()), dirEntry.getSize(), dirEntry.hasProperties(), dirEntry.getRevision(), dirEntry.getDate() != null ? dirEntry.getDate().getTime()*1000 : 0, dirEntry.getAuthor() ); }
protected static DirEntry getDirEntry(SVNDirEntry dirEntry, String reposRelativePath) { if (dirEntry == null) { return null; } return new DirEntry(dirEntry.getRelativePath(), SVNPathUtil.append(reposRelativePath, dirEntry.getRelativePath()), SVNClientImpl.getNodeKind(dirEntry.getKind()), dirEntry.getSize(), dirEntry.hasProperties(), dirEntry.getRevision(), dirEntry.getDate().getTime(), dirEntry.getAuthor()); }
public void handleDirEntry(SVNDirEntry dirEntry) throws SVNException { handler.handleDirEntry(new SVNDirEntry(url.appendPath(dirEntry.getName(), false), dirEntry.getName(), dirEntry.getKind(), dirEntry.getSize(), dirEntry.hasProperties(), dirEntry.getRevision(), dirEntry.getDate(), dirEntry.getAuthor())); } };
private DirEntry getDirEntry(SVNDirEntry dirEntry) { if (dirEntry == null) { return null; } String repositoryRootString = getUrlString(dirEntry.getRepositoryRoot()); String urlString = getUrlString(dirEntry.getURL()); String absolutePath = SVNPathUtil.getRelativePath(repositoryRootString, urlString); return new DirEntry(dirEntry.getRelativePath(), absolutePath, getNodeKind(dirEntry.getKind()), dirEntry.getSize(), dirEntry.hasProperties(), dirEntry.getRevision(), getLongDate(dirEntry.getDate()), dirEntry.getAuthor()); }
private SvnInfo creatSvnInfoForEntry(SVNURL root, String uuid, SVNDirEntry entry, SVNURL entryURL, long revision, SVNLock lock) { SvnInfo info = new SvnInfo(); info.setKind(entry.getKind()); info.setLastChangedAuthor(entry.getAuthor()); info.setLastChangedDate(SVNDate.fromDate(entry.getDate())); info.setLastChangedRevision(entry.getRevision()); info.setLock(lock); info.setRepositoryRootURL(root); info.setRepositoryUuid(uuid); info.setSize(entry.getSize()); info.setUrl(entryURL); info.setRevision(revision); return info; }