+ Added localization support for commands
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package utils;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Files;
|
||||
@@ -24,7 +25,7 @@ public class FileUtils
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
GlobalLog.Error(LogFilter.Util, e.getMessage());
|
||||
}
|
||||
|
||||
return contentBuilder.toString();
|
||||
@@ -35,13 +36,18 @@ public class FileUtils
|
||||
{
|
||||
ArrayList<Path> items = new ArrayList<Path>();
|
||||
|
||||
File tmpDir = new File(startingDir);
|
||||
if(!tmpDir.exists())
|
||||
return new ArrayList<Path>();
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
Files.find(Paths.get(startingDir), 999, (path, attributes) -> attributes.isRegularFile()).forEach(items::add);
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
GlobalLog.Error(LogFilter.Util, e.getMessage());
|
||||
}
|
||||
|
||||
return items;
|
||||
|
||||
Reference in New Issue
Block a user