use of com.github.mgramin.sqlboot.tools.files.file.impl.SimpleFile in project sql-boot by sql-boot.
the class LocalFileSystem method listFiles.
@Override
public List<File> listFiles(final String mask) {
try {
DirectoryScanner scanner = new DirectoryScanner();
scanner.setIncludes(new String[] { mask });
scanner.setBasedir(this.basedir.replace("\\", "/"));
scanner.setCaseSensitive(false);
scanner.scan();
String[] files = scanner.getIncludedFiles();
List<File> result = new ArrayList<>();
for (String file : files) {
result.add(new SimpleFile(file, FileUtils.readFileToByteArray(new java.io.File(basedir + "/" + file))));
}
return result;
} catch (IOException exception) {
throw new BootException(exception);
}
}
Aggregations