mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-26 21:42:11 +00:00
Fixing WriteAllLines issue
This commit is contained in:
parent
b5a325f119
commit
d5cedcf1cf
1 changed files with 18 additions and 11 deletions
|
|
@ -120,18 +120,25 @@ namespace Cosmos.System_Plugs.System.IO
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void WriteAllLines(string aFile, IEnumerable<string> contents)
|
/* public static void WriteAllLines(string aFile, IEnumerable<string> contents)
|
||||||
|
* {
|
||||||
|
* string text = null;
|
||||||
|
*
|
||||||
|
* foreach (var line in contents)
|
||||||
|
* {
|
||||||
|
* text = string.Concat(text, line, Environment.NewLine);
|
||||||
|
* }
|
||||||
|
*
|
||||||
|
* Global.mFileSystemDebugger.SendInternal("Writing contents");
|
||||||
|
* Global.mFileSystemDebugger.SendInternal(text);
|
||||||
|
*
|
||||||
|
* WriteAllText(aFile, text);
|
||||||
|
* }
|
||||||
|
*/
|
||||||
|
|
||||||
|
public static void WriteAllLines(string aFile, string[] contents)
|
||||||
{
|
{
|
||||||
string text = null;
|
string text = String.Join(Environment.NewLine, contents);
|
||||||
|
|
||||||
foreach (var line in contents)
|
|
||||||
{
|
|
||||||
text = string.Concat(text, line, Environment.NewLine);
|
|
||||||
}
|
|
||||||
|
|
||||||
Global.mFileSystemDebugger.SendInternal("Writing contents");
|
|
||||||
Global.mFileSystemDebugger.SendInternal(text);
|
|
||||||
|
|
||||||
WriteAllText(aFile, text);
|
WriteAllText(aFile, text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue