Created
November 8, 2014 07:09
-
-
Save RammusXu/b24e25ef9bbf84bbc644 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void writeFile(String dir, String filename, String string) { | |
FileWriter fw; | |
try { | |
File f = new File(dir, filename); | |
if (!f.exists()) { | |
f.createNewFile(); | |
} | |
fw = new FileWriter(f, true); | |
fw.append(string); | |
fw.close(); | |
} catch (IOException e) { | |
e.printStackTrace(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment