62,041
社区成员
发帖
与我相关
我的任务
分享
string path = "c:\\temp\\index.htm";
FileInfo fi = new FileInfo(path);
if (fi.Exists == false) {
//Create a file to write to.
StreamWriter sw = fi.CreateText();
sw.WriteLine("<html><head>index</head><body>Hello world</body></html>");
sw.Flush();
sw.Close();
}