private void UpdateMetadata() { if (!_file.Context.ReadOnly) { // Update the standard information attribute - so it reflects the actual file state if (_isDirty) { _file.Modified(); } else { _file.Accessed(); } // Update the directory entry used to open the file, so it's accurate _entry.UpdateFrom(_file); // Write attribute changes back to the Master File Table _file.UpdateRecordInMft(); _isDirty = false; } }