Renamed FileSearch class and defined default values

This commit is contained in:
Ziver Koc 2015-11-11 18:07:48 +01:00
parent e2e6a40ce9
commit 997ec1c52b
8 changed files with 286 additions and 280 deletions

6
src/zutil/plugin/PluginManager.java Normal file → Executable file
View file

@ -25,7 +25,7 @@
package zutil.plugin;
import zutil.io.IOUtil;
import zutil.io.file.FileSearch;
import zutil.io.file.FileSearcher;
import zutil.log.LogUtil;
import zutil.parser.DataNode;
import zutil.parser.json.JSONParser;
@ -61,14 +61,14 @@ public class PluginManager<T> implements Iterable<PluginData>{
public PluginManager(String path){
plugins = new HashMap<String, PluginData>();
FileSearch search = new FileSearch(new File(path));
FileSearcher search = new FileSearcher(new File(path));
search.setRecursive(true);
search.searchFolders(false);
search.searchCompressedFiles(true);
search.setFileName("plugin.json");
log.fine("Searching for plugins...");
for(FileSearch.FileSearchItem file : search){
for(FileSearcher.FileSearchItem file : search){
try {
DataNode node = JSONParser.read(IOUtil.getContentString(file.getInputStream()));
log.fine("Found plugin: "+file.getPath());