디렉토리의 파일 읽기 filter 추가

master
mjkhan21 1 year ago
parent a4a0890103
commit 0a35cb3f7b

@ -76,27 +76,21 @@ public class SmgInBean extends FileJobBean {
alert(interfaceSequences); alert(interfaceSequences);
if (!isEmpty(fileStatus)) if (!isEmpty(fileStatus))
move( move(FileStatus.getPaths(fileStatus), successDir());
fileStatus.stream().map(FileStatus::getPath).collect(Collectors.toList()),
successDir()
);
fileStatus = received.get(false); fileStatus = received.get(false);
if (!isEmpty(fileStatus)) if (!isEmpty(fileStatus))
move( move(FileStatus.getPaths(fileStatus), failDir());
fileStatus.stream().map(FileStatus::getPath).collect(Collectors.toList()),
failDir()
);
return interfaceSequences; return interfaceSequences;
} }
private List<FileStatus> parse() { private List<FileStatus> parse() {
String infoType = config("infoType"); String infoType = config("infoType");
List<Path> paths = getReceivedFilePaths(); List<Path> paths = getReceivedFilePaths(null);
return paths.stream() return paths.stream()
.map(path -> parse(infoType, path)) .map(path -> parse(infoType, path))
.collect(Collectors.toList()); .toList();
} }
private FileStatus parse(String infoType, Path path) { private FileStatus parse(String infoType, Path path) {

Loading…
Cancel
Save