Package de.schlichtherle.truezip.file

Examples of de.schlichtherle.truezip.file.TFile


        }
        unmount();
    }

    public static TFile jarFile(final File jarFile, final String dirInJar, final String targetFileName) {
        return new TFile(format("{0}/{1}/{2}", jarFile.getAbsolutePath(), dirInJar, targetFileName));
    }
View Full Code Here


            final PatchTarget patchTarget = filesToPatch.get(patchFilePath);

            if (revisionManager.isCurrentVersionGreaterThen(patchTarget.getMinRevision()) &&
                    revisionManager.isCurrentVersionLowerThen(patchTarget.getMaxRevision())) {
                final TFile patchFile = getPatchFile(patchFilePath);

                final String targetFileName = patchFile.getName();

                for (final String pathToArchive : patchTarget.getPathToArchives()) {
                    final File jarFile = findFileInLibDirectory(pathToArchive);
                    if (jarFile.exists()) {
                        final TFile jarEntry = jarFile(jarFile, patchTarget.getInnerDir(), targetFileName);

                        final File bakFile = bakFile(patchFile, jarFile);
                        if (!bakFile.exists()) {
                            extractFromJar(bakFile, jarEntry);
                        }
View Full Code Here

        }
    }

    private TFile getPatchFile(final String patchFilePath) {
        final URI uri = getPatchFileURI(patchFilePath);
        return new TFile(uri);
    }
View Full Code Here

            final PatchTarget patchTarget = filesToPatch.get(patchFilePath);

            if (revisionManager.isCurrentVersionGreaterThen(patchTarget.getMinRevision()) &&
                    revisionManager.isCurrentVersionLowerThen(patchTarget.getMaxRevision())) {
                final TFile patchFile = getPatchFile(patchFilePath);

                final String targetFileName = patchFile.getName();

                for (final String pathToArchive : patchTarget.getPathToArchives()) {
                    final File jarFile = findFileInLibDirectory(pathToArchive);
                    final TFile jarEntry = jarFile(jarFile, patchTarget.getInnerDir(), targetFileName);

                    if (jarFile.exists() && filesAreDifferent(patchFile, jarEntry)) {
                        filesArePatched = false;
                    }
                }
View Full Code Here

            final String targetFileName = patchFile.getName();

            for (final String pathToArchive : patchTarget.getPathToArchives()) {
                final File jarFile = findFileInLibDirectory(pathToArchive);
                final TFile jarEntry = jarFile(jarFile, patchTarget.getInnerDir(), targetFileName);

                final TFile bakFile = bakFile(patchFile, jarFile);

                if (bakFileExists(bakFile) && filesAreDifferent(bakFile, jarEntry)) {
                    putIntoJar(bakFile, jarEntry);
                    jarWasModified = true;
                }
View Full Code Here

            throw new RuntimeException(e);
        }
    }

    private TFile bakFile(final File patchFile, final File jarFile) {
        return new TFile(format("{0}/{1}.bak", jarFile.getParent(), patchFile.getName()));
    }
View Full Code Here

TOP

Related Classes of de.schlichtherle.truezip.file.TFile

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.