Skip to content

Commit

Permalink
Update FileManageLocal.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
Sky-CSC committed May 14, 2022
1 parent 54af352 commit b618fc7
Showing 1 changed file with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,13 @@ public static void WriteFilePath(string path, string message)
{
try
{
using (StreamWriter sw = File.AppendText(path))
{
sw.WriteLine(message);
sw.Close();
sw.Dispose();
}
//using (StreamWriter sw = File.AppendText(path))
//{
// sw.WriteLine(message);
// sw.Close();
// sw.Dispose();
//}
File.WriteAllText(path, message);
}
catch (Exception e)
{
Expand All @@ -77,13 +78,12 @@ public static string ReadFilePath(string path)
string data = "";
try
{
//using (StreamWriter sw = File.AppendText(path))
//{
// sw.WriteLine(message);
// sw.Close();
// sw.Dispose();
//}
File.WriteAllText(path, message);
using (StreamReader sr = File.OpenText(path))
{
data = sr.ReadToEnd();
sr.Close();
sr.Dispose();
}
}
catch (Exception e)
{
Expand Down

0 comments on commit b618fc7

Please sign in to comment.