public synchronized void close ( boolean write ) { if ( dataFile == null ) { return ; } try { cache . saveAll ( ) ; boolean empty = ( dataFile . length ( ) <= NL . length ( ) ) ; dataFile . close ( ) ; dataFile = null ; if ( empty && ! cacheReadonly ) { FileUtil . getDefaultInstance ( ) . delete ( fileName ) ; } } catch ( Exception e ) { throw Error . error ( ErrorCode . FILE_IO_ERROR , ErrorCode . M_TextCache_closing_file_error , new Object [ ] { fileName , e } ) ; } }
Writes newly created rows to disk . In the current implentation such rows have already been saved so this method just removes a source file that has no rows .