mirror of
https://github.com/2009scape/2009Scape-mobile.git
synced 2025-12-21 09:01:56 -07:00
Fix Tools.write
This commit is contained in:
parent
00f6d29fb9
commit
57461d30e6
1 changed files with 4 additions and 1 deletions
|
|
@ -782,7 +782,10 @@ public final class Tools {
|
|||
}
|
||||
|
||||
public static void write(String path, String content) throws IOException {
|
||||
try(FileOutputStream outStream = new FileOutputStream(path)) {
|
||||
File file = new File(path);
|
||||
File parent = file.getParentFile();
|
||||
if(!parent.exists()) parent.mkdirs();
|
||||
try(FileOutputStream outStream = new FileOutputStream(file)) {
|
||||
IOUtils.write(content, outStream);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue