Systen,IO
private void CreateHtml(string sPath, string txt)
{
string currPath = @"C:\MyCodeHelper" + sPath;
FileInfo fi = new FileInfo(currPath);
var di = fi.Directory;
if (!di.Exists)
di.Create();
using (StreamWriter s = File.CreateText(currPath))
{
s.Write(txt);
}
}
浙公网安备 33010602011771号