/** * Determines if a file should be unpacked. * * @param file the file to check * @return {@code true} if the file should be unpacked; {@code false} if it should be skipped */ private boolean shouldUnpack(PackFile file) { boolean result = true; if (file.hasCondition()) { result = isConditionTrue(file.getCondition()); } if (result && file.osConstraints() != null && !file.osConstraints().isEmpty()) { result = matcher.matchesCurrentPlatform(file.osConstraints()); } return result; }
file.osConstraints(), file.override(), file.overrideRenameTo(), file.blockable(), file.getAdditionals());
/** * Constructs an <tt>XPackFile</tt> from an {@link PackFile}. * * @param file the pack file * @throws IOException if an I/O error occurred */ public XPackFile(PackFile file) throws IOException { super(new File(file.sourcePath), file.getRelativeSourcePath(), file.getTargetPath(), file.osConstraints(), file.override(), file.overrideRenameTo(), file.blockable(), file.getAdditionals(), null); this.position = 0; this.setCondition(file.getCondition()); }