@Override public Integer invoke(File f, VirtualChannel channel) throws IOException { return IOUtils.mode(stating(f)); } }
@Override public int mode() throws IOException { if (isIllegalSymlink()) { return -1; } return IOUtils.mode(f); } @Override public long lastModified() throws IOException {
relativePath+='/'; TarArchiveEntry te = new TarArchiveEntry(relativePath); int mode = IOUtils.mode(file); if (mode!=-1) te.setMode(mode); te.setModTime(file.lastModified());
public void visit(final File f, final String _relativePath) throws IOException { int mode = IOUtils.mode(f);
@Override public void visitSymlink(File link, String target, String relativePath) throws IOException { TarArchiveEntry e = new TarArchiveEntry(relativePath, TarConstants.LF_SYMLINK); try { int mode = IOUtils.mode(link); if (mode != -1) { e.setMode(mode); } } catch (PosixException x) { // ignore } e.setLinkName(target); tar.putArchiveEntry(e); tar.closeArchiveEntry(); entriesWritten++; }
public Integer invoke(File f, VirtualChannel channel) throws IOException { return IOUtils.mode(stating(f)); } });
@Override public void visitSymlink(File link, String target, String relativePath) throws IOException { TarArchiveEntry e = new TarArchiveEntry(relativePath, LF_SYMLINK); try { int mode = IOUtils.mode(link); if (mode != -1) { e.setMode(mode); } } catch (PosixException x) { // ignore } try { StringBuffer linkName = (StringBuffer) LINKNAME_FIELD.get(e); linkName.setLength(0); linkName.append(target); } catch (IllegalAccessException x) { throw new IOException("Failed to set linkName", x); } tar.putArchiveEntry(e); entriesWritten++; }
te.setName(relativePath); int mode = IOUtils.mode(file); if (mode!=-1) { te.setMode(mode);
relativePath+='/'; TarArchiveEntry te = new TarArchiveEntry(relativePath); int mode = IOUtils.mode(file); if (mode!=-1) te.setMode(mode); te.setModTime(file.lastModified());
public void visit(final File f, final String _relativePath) throws IOException { int mode = IOUtils.mode(f);
@Override public void visitSymlink(File link, String target, String relativePath) throws IOException { TarArchiveEntry e = new TarArchiveEntry(relativePath, TarConstants.LF_SYMLINK); try { int mode = IOUtils.mode(link); if (mode != -1) { e.setMode(mode); } } catch (PosixException x) { // ignore } e.setLinkName(target); tar.putArchiveEntry(e); tar.closeArchiveEntry(); entriesWritten++; }