mirror of https://github.com/OpenVidu/openvidu.git
openvidu-server: CustomFileManager#createAndWriteFileWithFolders
parent
13232496c0
commit
48097f5f9a
|
@ -42,6 +42,15 @@ public class CustomFileManager {
|
|||
}
|
||||
}
|
||||
|
||||
public boolean createAndWriteFileWithFolders(String filePath, String text) {
|
||||
File f = new File(filePath);
|
||||
if (!f.exists()) {
|
||||
// This doesn't fail if no permissions
|
||||
f.getParentFile().mkdirs();
|
||||
}
|
||||
return this.createAndWriteFile(filePath, text);
|
||||
}
|
||||
|
||||
public boolean overwriteFile(String filePath, String text) {
|
||||
try {
|
||||
this.writeAndCloseOnOutputStreamWriter(new FileOutputStream(filePath, false), text);
|
||||
|
|
Loading…
Reference in New Issue