private void ReadSystemFileAttributes() { //** retrieve the File size from Xml file string xmlFilename = string.Format("{0}.{1}", SystemFile.Filename, DataInfExtensionLiteral); if (System.IO.File.Exists(xmlFilename)) { // delete inf file if the data file is missing... if (!System.IO.File.Exists(SystemFile.Filename)) { System.IO.File.Delete(xmlFilename); return; } try { using (var sr = new System.IO.StreamReader(xmlFilename)) { string s = sr.ReadToEnd(); _systemFileInfo = SystemFileSerializer.FromString(s); ((File.IFile)SystemFile).Size = _systemFileInfo.FileSize; HomePath = _systemFileInfo.HomePath; //Log.Logger.Instance.Warning("Read DB Size: {0}", _systemFileInfo.FileSize); } } catch { } //** ignore exception as system file size will be computed from file size itself if not provided... } }
private void ReadSystemFileAttributes() { //** retrieve the File size from Xml file string xmlFilename = string.Format("{0}.{1}", SystemFile.Filename, DataInfExtensionLiteral); if (System.IO.File.Exists(xmlFilename)) { try { using (var sr = new System.IO.StreamReader(xmlFilename)) { string s = sr.ReadToEnd(); _systemFileInfo = SystemFileSerializer.FromString(s); ((File.IFile)SystemFile).Size = _systemFileInfo.FileSize; HomePath = _systemFileInfo.HomePath; } } catch { } //** ignore exception as system file size will be computed from file size itself if not provided... } }