Skip to content

Commit 282c5c1

Browse files
committed
the append and write methods create the file automatically
1 parent c911a25 commit 282c5c1

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/InEngine.Core/IO/Write.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,11 @@ public string FlushBuffer()
113113
public void ToFile(string path, string text, bool shouldAppend = false)
114114
{
115115
fileOutputLock.WaitOne();
116-
if (!File.Exists(path))
117-
File.Create(path);
118116
if (shouldAppend)
119117
File.AppendAllText(path, text);
120118
else
121119
File.WriteAllText(path, text);
120+
122121
fileOutputLock.ReleaseMutex();
123122
}
124123
}

0 commit comments

Comments
 (0)