源代码创建文件,文件夹,并创建txt写入内容


	string path = "D:/2014研究生复试/曾念念/SOURCE";
    Directory.CreateDirectory(path);
     path += "/readme.txt";
     FileInfo fi = new FileInfo(path);
     if (!fi.Exists)
     {
         fi.Create().Close();
     }
     StreamWriter sw = new StreamWriter(path);
     string[] s = connStr.Split(';');
     
     foreach (string str in s)
     {
         sw.WriteLine(str);
     }
     sw.Close();

你可能感兴趣的:(数据库系统)