mirror of
https://github.com/MarginaliaSearch/MarginaliaSearch.git
synced 2025-02-23 13:09:00 +00:00
(converter) Ensure paths are created for converter batch writer
This commit is contained in:
parent
fb2beb1eac
commit
a7468c8d23
@ -17,6 +17,7 @@ import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.util.*;
|
||||
|
||||
@ -35,6 +36,16 @@ public class ConverterBatchWriter implements AutoCloseable, ConverterBatchWriter
|
||||
Path linksPath = ProcessedDataFileNames.domainLinkFileName(basePath);
|
||||
Path docsPath = ProcessedDataFileNames.documentFileName(basePath);
|
||||
|
||||
if (!Files.exists(domainPath)) {
|
||||
Files.createDirectory(domainPath);
|
||||
}
|
||||
if (!Files.exists(linksPath)) {
|
||||
Files.createDirectory(linksPath);
|
||||
}
|
||||
if (!Files.exists(docsPath)) {
|
||||
Files.createDirectory(docsPath);
|
||||
}
|
||||
|
||||
domainWriter = new SlopDomainRecord.Writer(domainPath, batchNumber);
|
||||
domainLinkWriter = new SlopDomainLinkRecord.Writer(linksPath, batchNumber);
|
||||
documentWriter = new SlopDocumentRecord.Writer(docsPath, batchNumber);
|
||||
|
Loading…
Reference in New Issue
Block a user