JunZhang
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
3 additions and
0 deletions
-
app/src/main/java/com/cobo/cold/update/utils/FileUtils.java
|
|
@ -52,6 +52,9 @@ public class FileUtils { |
|
|
|
public static boolean writeString(@NonNull File file, String content) { |
|
|
|
try(FileOutputStream fos = new FileOutputStream(file)) { |
|
|
|
fos.write(content.getBytes()); |
|
|
|
fos.getFD().sync(); |
|
|
|
fos.flush(); |
|
|
|
fos.close(); |
|
|
|
return true; |
|
|
|
} catch (Exception e) { |
|
|
|
e.printStackTrace(); |
|
|
|