public void write ( String text ) throws IOException { file . getParentFile ( ) . mkdirs ( ) ; AtomicFileWriter w = new AtomicFileWriter ( file ) ; try { w . write ( text ) ; w . commit ( ) ; } finally { w . abort ( ) ; } }
Overwrites the file by the given string .