From 8907757674e448bf2255d8f50075a8db4368d4c0 Mon Sep 17 00:00:00 2001 From: Ganblejs Date: Sun, 3 Mar 2024 15:58:34 +0100 Subject: [PATCH] FileUtils: add description for copyStringtoFile ... and remove commented out code --- .../gadgetbridge/util/FileUtils.java | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/util/FileUtils.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/util/FileUtils.java index 207c9fb08..240398c8d 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/util/FileUtils.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/util/FileUtils.java @@ -90,20 +90,12 @@ public class FileUtils { } } } - /* - File outputFile = new File(dir, filename); - String filenameLogID = "latestFetchedRecorderLog.txt"; - File outputFileLogID = new File(dir, filenameLogID); - LOG.warn("Writing log to " + outputFile.toString()); - try { - BufferedWriter writer = new BufferedWriter(new FileWriter(outputFile, true)); - writer.write(line); - writer.close(); - //GB.toast(getContext(), "Log written to " + filename, Toast.LENGTH_LONG, GB.INFO); - BufferedWriter writerLogID = new BufferedWriter(new FileWriter(outputFileLogID)); - writerLogID.write(log); - writerLogID.close(); + /** + * Copies the contents of the given string to the destination file. + * @param string the contents to write. + * @param dst the file to write to + * @throws IOException */ public static void copyStringToFile(String string, File dst, String mode) throws IOException{ BufferedWriter writer;