/// /// 写入文件 /// /// 文件夹的路径 /// 写入的文本内容 /// 写入的文本文件名称 public static void WriteFile ( string driectory, string content, string fileName ) { CreateDirectory ( driectory ); FileStream fs = new FileStream ( driectory + fileName, FileMode.OpenOrCreate, FileAccess.Write ); StreamWriter m_streamWriter = new StreamWriter ( fs ); m_streamWriter.BaseStream.Seek ( 0, SeekOrigin.End ); m_streamWriter.WriteLine ( content + "\n" ); m_streamWriter.Flush(); m_streamWriter.Close(); fs.Close(); }
by: 发表于:2018-01-31 15:12:29 顶(0) | 踩(0) 回复
??
回复评论