List of usage examples for org.apache.commons.compress.archivers.cpio CpioConstants C_ISDIR
int C_ISDIR
To view the source code for org.apache.commons.compress.archivers.cpio CpioConstants C_ISDIR.
Click Source Link
From source file:org.eclipse.packagedrone.utils.rpm.build.RpmBuilder.java
private void addDirectory(final String targetName, final int mode, final Instant modInstant, final Consumer<FileEntry> customizer) throws IOException { final PathName pathName = PathName.parse(targetName); final long mtime = modInstant.getEpochSecond(); final int inode = this.currentInode++; final short smode = (short) (mode | CpioConstants.C_ISDIR); final Result result = this.recorder.addDirectory("./" + pathName.toString(), cpioCustomizer(mtime, inode, smode)); Consumer<FileEntry> c = this::initEntry; c = c.andThen(entry -> {/*from w w w .ja v a 2 s. c o m*/ entry.setModificationTime((int) mtime); entry.setInode(inode); entry.setMode(smode); entry.setSize(0); entry.setTargetSize(4096); }); if (customizer != null) { c = c.andThen(customizer); } addResult(pathName, result, c); }