boolean flush() throws IOException {

		if (raf == null || readOnly || temporary) {
			return false;
		}

		// write header
		writeHeader();

		// Adjust file length
		long len = raf.length();
		long d = len % blockSize;
		if (d != 0) {
			raf.setLength(len - d + blockSize);
		}

		try {
			raf.getFD().sync();
		}
		catch (SyncFailedException e) {
			// Sync not supported - we tried our best
		}

		return true;
	}
Write all unwritten data to the file prior to closing.
@return true if flush was performed, false if not required.
@throws IOException thrown if flush failed
Ghidra/Framework/DB/src/main/java/db/buffers/LocalBufferFile.java