Java 类cpw.mods.fml.relauncher.FileListHelper 实例源码

项目:TRHS_Club_Mod_2016    文件:ModDiscoverer.java   
public void findModDirMods(File modsDir, File[] supplementalModFileCandidates)
{
    File[] modList = FileListHelper.sortFileList(modsDir, null);
    modList = FileListHelper.sortFileList(ObjectArrays.concat(modList, supplementalModFileCandidates, File.class));
    for (File modFile : modList)
    {
        // skip loaded coremods
        if (CoreModManager.getLoadedCoremods().contains(modFile.getName()))
        {
            FMLLog.finer("Skipping already parsed coremod or tweaker %s", modFile.getName());
        }
        else if (modFile.isDirectory())
        {
            FMLLog.fine("Found a candidate mod directory %s", modFile.getName());
            candidates.add(new ModCandidate(modFile, modFile, ContainerType.DIR));
        }
        else
        {
            Matcher matcher = zipJar.matcher(modFile.getName());

            if (matcher.matches())
            {
                FMLLog.fine("Found a candidate zip or jar file %s", matcher.group(0));
                candidates.add(new ModCandidate(modFile, modFile, ContainerType.JAR));
            }
            else
            {
                FMLLog.fine("Ignoring unknown file %s in mods directory", modFile.getName());
            }
        }
    }
}
项目:CauldronGit    文件:ModDiscoverer.java   
public void findModDirMods(File modsDir)
{
    File[] modList = FileListHelper.sortFileList(modsDir, null);

    for (File modFile : modList)
    {
        // skip loaded coremods
        if (CoreModManager.getLoadedCoremods().contains(modFile.getName()))
        {
            FMLLog.finer("Skipping already parsed coremod or tweaker %s", modFile.getName());
        }
        else if (modFile.isDirectory())
        {
            FMLLog.fine("Found a candidate mod directory %s", modFile.getName());
            candidates.add(new ModCandidate(modFile, modFile, ContainerType.DIR));
        }
        else
        {
            Matcher matcher = zipJar.matcher(modFile.getName());

            if (matcher.matches())
            {
                FMLLog.fine("Found a candidate zip or jar file %s", matcher.group(0));
                candidates.add(new ModCandidate(modFile, modFile, ContainerType.JAR));
            }
            else
            {
                FMLLog.fine("Ignoring unknown file %s in mods directory", modFile.getName());
            }
        }
    }
}
项目:Cauldron    文件:ModDiscoverer.java   
public void findModDirMods(File modsDir)
{
    File[] modList = FileListHelper.sortFileList(modsDir, null);

    for (File modFile : modList)
    {
        // skip loaded coremods
        if (CoreModManager.getLoadedCoremods().contains(modFile.getName()))
        {
            FMLLog.finer("Skipping already parsed coremod or tweaker %s", modFile.getName());
        }
        else if (modFile.isDirectory())
        {
            FMLLog.fine("Found a candidate mod directory %s", modFile.getName());
            candidates.add(new ModCandidate(modFile, modFile, ContainerType.DIR));
        }
        else
        {
            Matcher matcher = zipJar.matcher(modFile.getName());

            if (matcher.matches())
            {
                FMLLog.fine("Found a candidate zip or jar file %s", matcher.group(0));
                candidates.add(new ModCandidate(modFile, modFile, ContainerType.JAR));
            }
            else
            {
                FMLLog.fine("Ignoring unknown file %s in mods directory", modFile.getName());
            }
        }
    }
}
项目:Cauldron    文件:ModDiscoverer.java   
public void findModDirMods(File modsDir)
{
    File[] modList = FileListHelper.sortFileList(modsDir, null);

    for (File modFile : modList)
    {
        // skip loaded coremods
        if (CoreModManager.getLoadedCoremods().contains(modFile.getName()))
        {
            FMLLog.finer("Skipping already parsed coremod or tweaker %s", modFile.getName());
        }
        else if (modFile.isDirectory())
        {
            FMLLog.fine("Found a candidate mod directory %s", modFile.getName());
            candidates.add(new ModCandidate(modFile, modFile, ContainerType.DIR));
        }
        else
        {
            Matcher matcher = zipJar.matcher(modFile.getName());

            if (matcher.matches())
            {
                FMLLog.fine("Found a candidate zip or jar file %s", matcher.group(0));
                candidates.add(new ModCandidate(modFile, modFile, ContainerType.JAR));
            }
            else
            {
                FMLLog.fine("Ignoring unknown file %s in mods directory", modFile.getName());
            }
        }
    }
}
项目:Cauldron    文件:ModDiscoverer.java   
public void findModDirMods(File modsDir)
{
    File[] modList = FileListHelper.sortFileList(modsDir, null);

    for (File modFile : modList)
    {
        // skip loaded coremods
        if (CoreModManager.getLoadedCoremods().contains(modFile.getName()))
        {
            FMLLog.finer("Skipping already parsed coremod or tweaker %s", modFile.getName());
        }
        else if (modFile.isDirectory())
        {
            FMLLog.fine("Found a candidate mod directory %s", modFile.getName());
            candidates.add(new ModCandidate(modFile, modFile, ContainerType.DIR));
        }
        else
        {
            Matcher matcher = zipJar.matcher(modFile.getName());

            if (matcher.matches())
            {
                FMLLog.fine("Found a candidate zip or jar file %s", matcher.group(0));
                candidates.add(new ModCandidate(modFile, modFile, ContainerType.JAR));
            }
            else
            {
                FMLLog.fine("Ignoring unknown file %s in mods directory", modFile.getName());
            }
        }
    }
}