public bool Flush() { if (m_mode != O_RDONLY) { if (!FlushData()) return false; if ((m_flags & TiffFlags.DIRTYDIRECT) == TiffFlags.DIRTYDIRECT && !WriteDirectory()) return false; } return true; }