Inherits java::io::FileWriter.
Public Member Functions | |
PreservingFileWriter (String file) throws IOException | |
the tmp file we create at first | |
void | close () throws IOException |
Protected Attributes | |
File | target_file |
File | tmp_file |
the file we intend to write to |
PreservingFileWriter only overwrites target if the new file is different. Mainly added in order to prevent big and unnecessary recompiles in C++ projects. I/O is buffered.
antlr.PreservingFileWriter.PreservingFileWriter | ( | String | file | ) | throws IOException |
the tmp file we create at first
References antlr.PreservingFileWriter.target_file, and antlr.PreservingFileWriter.tmp_file.
void antlr.PreservingFileWriter.close | ( | ) | throws IOException |
Close the file and see if the actual target is different if so the target file is overwritten by the copy. If not we do nothing
References antlr.PreservingFileWriter.target_file, and antlr.PreservingFileWriter.tmp_file.
File antlr.PreservingFileWriter.target_file [protected] |
Referenced by antlr.PreservingFileWriter.close(), and antlr.PreservingFileWriter.PreservingFileWriter().
File antlr.PreservingFileWriter.tmp_file [protected] |
the file we intend to write to
Referenced by antlr.PreservingFileWriter.close(), and antlr.PreservingFileWriter.PreservingFileWriter().