From 2b2a027fb08aca6e7400b2cf5afbb886a8f9ac76 Mon Sep 17 00:00:00 2001 From: MidoriKami <9083275+MidoriKami@users.noreply.github.com> Date: Tue, 19 Sep 2023 23:44:56 -0700 Subject: [PATCH] Move WriteAllTextSafe to correct location --- Dalamud/Utility/Util.cs | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/Dalamud/Utility/Util.cs b/Dalamud/Utility/Util.cs index c386ee23e..8ca87b691 100644 --- a/Dalamud/Utility/Util.cs +++ b/Dalamud/Utility/Util.cs @@ -609,7 +609,23 @@ public static class Util } } } + + /// + /// Overwrite text in a file by first writing it to a temporary file, and then + /// moving that file to the path specified. + /// + /// The path of the file to write to. + /// The text to write. + public static void WriteAllTextSafe(string path, string text) + { + var tmpPath = path + ".tmp"; + if (File.Exists(tmpPath)) + File.Delete(tmpPath); + File.WriteAllText(tmpPath, text); + File.Move(tmpPath, path, true); + } + /// /// Dispose this object. /// @@ -645,22 +661,6 @@ public static class Util } } - /// - /// Overwrite text in a file by first writing it to a temporary file, and then - /// moving that file to the path specified. - /// - /// The path of the file to write to. - /// The text to write. - public static void WriteAllTextSafe(string path, string text) - { - var tmpPath = path + ".tmp"; - if (File.Exists(tmpPath)) - File.Delete(tmpPath); - - File.WriteAllText(tmpPath, text); - File.Move(tmpPath, path, true); - } - /// /// Gets a random, inoffensive, human-friendly string. ///