Package com.skcraft.launcher.model.modpack

Examples of com.skcraft.launcher.model.modpack.FileInstall


    protected void onFile(File file, String relPath) throws IOException {
        if (file.getName().endsWith(FileInfoScanner.FILE_SUFFIX)) {
            return;
        }

        FileInstall entry = new FileInstall();
        String hash = Files.hash(file, hf).toString();
        String hashedPath = hash.substring(0, 2) + "/" + hash.substring(2, 4) + "/" + hash;
        File destPath = new File(destDir, hashedPath);
        entry.setHash(hash);
        entry.setLocation(hashedPath);
        entry.setTo(FilenameUtils.separatorsToUnix(FilenameUtils.normalize(relPath)));
        entry.setSize(file.length());
        applicator.apply(entry);
        destPath.getParentFile().mkdirs();
        ClientFileCollector.log.info(String.format("Adding %s from %s...", relPath, file.getAbsolutePath()));
        Files.copy(file, destPath);
        manifest.getTasks().add(entry);
View Full Code Here

TOP

Related Classes of com.skcraft.launcher.model.modpack.FileInstall

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.