mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-07-28 01:15:26 -04:00
update chat views from upstream, support sending logs
Co-authored-by: jmacxx <47253594+jmacxx@users.noreply.github.com>
This commit is contained in:
parent
833cdb3b84
commit
1647a582f5
23 changed files with 1691 additions and 206 deletions
|
@ -26,6 +26,7 @@ import org.apache.commons.io.IOUtils;
|
|||
import javax.annotation.Nullable;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
@ -35,6 +36,7 @@ import java.util.Arrays;
|
|||
import java.util.Comparator;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Scanner;
|
||||
|
||||
@Slf4j
|
||||
public class FileUtil {
|
||||
|
@ -240,4 +242,14 @@ public class FileUtil {
|
|||
renameFile(storageFile, corruptedFile);
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean doesFileContainKeyword(File file, String keyword) throws FileNotFoundException {
|
||||
Scanner s = new Scanner(file);
|
||||
while (s.hasNextLine()) {
|
||||
if (s.nextLine().contains(keyword)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue