Mercurial Hosting > luan
comparison src/goodjava/lucene/logging/LoggingIndexWriter.java @ 1501:e66e3d50b289
mkdirs
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Sun, 10 May 2020 22:28:13 -0600 |
parents | 22e15cf73040 |
children | 8a7b6b32c691 |
comparison
equal
deleted
inserted
replaced
1500:f01abd6d5858 | 1501:e66e3d50b289 |
---|---|
52 private boolean isMerging = false; | 52 private boolean isMerging = false; |
53 | 53 |
54 public LoggingIndexWriter(LuceneIndexWriter indexWriter,File logDir) throws IOException { | 54 public LoggingIndexWriter(LuceneIndexWriter indexWriter,File logDir) throws IOException { |
55 this.indexWriter = indexWriter; | 55 this.indexWriter = indexWriter; |
56 this.logDir = logDir; | 56 this.logDir = logDir; |
57 logDir.mkdirs(); | 57 IoUtils.mkdirs(logDir); |
58 if( !logDir.isDirectory() ) | 58 if( !logDir.isDirectory() ) |
59 throw new RuntimeException(); | 59 throw new RuntimeException(); |
60 index = new File(logDir,"index"); | 60 index = new File(logDir,"index"); |
61 if( index.exists() ) { | 61 if( index.exists() ) { |
62 DataInputStream dis = new DataInputStream(new FileInputStream(index)); | 62 DataInputStream dis = new DataInputStream(new FileInputStream(index)); |