Aqueduct.Extensions.IO.UpdateFileText C# (CSharp) Метод

UpdateFileText() публичный статический Метод

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.
Результат void
        public static void UpdateFileText(this string absolutePath, string lookFor, string replaceWith)
        {
            string newText = GetFileText(absolutePath).Replace(lookFor, replaceWith);
            WriteToFile(absolutePath, newText);
        }