Examples of TFile


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

Examples of de.schlichtherle.truezip.file.TFile

            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

Examples of de.schlichtherle.truezip.file.TFile

        }
    }

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

Examples of de.schlichtherle.truezip.file.TFile

            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

Examples of de.schlichtherle.truezip.file.TFile

            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

Examples of de.schlichtherle.truezip.file.TFile

            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

Examples of net.java.truevfs.access.TFile

        if (card.isToken()) {
            if (pathCache.containsKey(card)) {
                return pathCache.get(card);
            }
            String filePath = getTokenImagePath(card);
            TFile file = new TFile(filePath);

            if (!file.exists() && card.getTokenSetCode() != null) {
                filePath = searchForCardImage(card);
                file = new TFile(filePath);
            }

            if (file.exists()) {
                pathCache.put(card, filePath);
                return filePath;
            }
        }
View Full Code Here

Examples of net.java.truevfs.access.TFile

    }

    private static String getTokenImagePath(CardDownloadData card) {
        String filename = generateImagePath(card);

        TFile file = new TFile(filename);
        if (!file.exists()) {
            CardDownloadData updated = new CardDownloadData(card);
            updated.setName(card.getName() + " 1");
            filename = generateImagePath(updated);
            file = new TFile(filename);
            if (!file.exists()) {
                updated = new CardDownloadData(card);
                updated.setName(card.getName() + " 2");
                filename = generateImagePath(updated);
            }
        }
View Full Code Here

Examples of net.java.truevfs.access.TFile

        return filename;
    }

    private static String searchForCardImage(CardDownloadData card) {
        TFile file;
        String path;
        CardDownloadData c = new CardDownloadData(card);
        c.setSet(card.getTokenSetCode());
        path = getTokenImagePath(c);
        file = new TFile(path);
        if (file.exists()) {
            pathCache.put(card, path);
            return path;
        }

//        for (String set : SettingsManager.getIntance().getTokenLookupOrder()) {
View Full Code Here

Examples of net.java.truevfs.access.TFile

            imageName = name + "." + card.getCollectorId() + ".full.jpg";
        } else {
            imageName = name + type + ".full.jpg";
        }

        if (new TFile(imageDir).exists() && !new TFile(imageDir + TFile.separator + imageName).exists()) {
            for (String fileName : new TFile(imageDir).list()) {
                if (fileName.toLowerCase().equals(imageName.toLowerCase())) {
                    imageName = fileName;
                    break;
                }
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.