List of usage examples for org.apache.commons.compress.archivers.cpio CpioConstants C_ISREG
int C_ISREG
To view the source code for org.apache.commons.compress.archivers.cpio CpioConstants C_ISREG.
Click Source Link
From source file:org.eclipse.packagedrone.utils.rpm.build.RpmBuilder.java
private <T> void addFile(final String targetName, final T sourcePath, final Consumer<FileEntry> customizer, final int mode, final Instant fileModificationInstant, final RecorderFunction<T> func) throws IOException { final PathName pathName = PathName.parse(targetName); final long mtime = fileModificationInstant.getEpochSecond(); final int inode = this.currentInode++; final short smode = (short) (mode | CpioConstants.C_ISREG); final Result result = func.record(this.recorder, "./" + pathName.toString(), sourcePath, cpioCustomizer(mtime, inode, smode)); Consumer<FileEntry> c = this::initEntry; c = c.andThen(entry -> {//from www . j av a2 s . com entry.setModificationTime((int) mtime); entry.setInode(inode); entry.setMode(smode); }); if (customizer != null) { c = c.andThen(customizer); } addResult(pathName, result, c); }