/// <summary> /// The is well formed xml file. /// </summary> /// <param name="filePath"> /// The file path. /// </param> /// <returns> /// The <see cref="bool"/>. /// </returns> public static bool IsWellFormedXmlFile(string filePath) { try { return(FileSystemPhysical.FileExists(filePath) && DoCheckAndCloseXmlReader(new XmlTextReader(filePath))); } catch { } return(false); }
/// <summary> /// The file open write. /// </summary> /// <param name="path"> /// The path. /// </param> /// <returns> /// The <see cref="FileStreamFoms"/>. /// </returns> public static FileStreamFoms FileOpenWrite(string path) { FileSystemPhysical.FileMakeWritable(path); return(new FileStreamFoms(path, FileMode.OpenOrCreate, FileAccess.Write, FileShare.Read)); }