Aqueduct.Extensions.IO.UpdateFileText C# (CSharp) Method

UpdateFileText() public static method

Update text within a file by replacing a substring within the file.
public static UpdateFileText ( this absolutePath, string lookFor, string replaceWith ) : void
absolutePath this The complete file path to write to.
lookFor string A String to be replaced.
replaceWith string A String to replace all occurrences of lookFor.
return void
        public static void UpdateFileText(this string absolutePath, string lookFor, string replaceWith)
        {
            string newText = GetFileText(absolutePath).Replace(lookFor, replaceWith);
            WriteToFile(absolutePath, newText);
        }