void purge ( ) { uncommittedCache . clear ( ) ; try { if ( cacheReadonly ) { close ( false ) ; } else { if ( dataFile != null ) { dataFile . close ( ) ; dataFile = null ; } FileUtil . getDefaultInstance ( ) . delete ( fileName ) ; } } catch ( Exception e ) { throw Error . error ( ErrorCode . FILE_IO_ERROR , ErrorCode . M_TextCache_purging_file_error , new Object [ ] { fileName , e } ) ; } }
Closes the source file and deletes it if it is not read - only .