12.14
来源:互联网 发布:数据透视表的高级应用 编辑:程序博客网 时间:2024/05/08 04:07
今天通过一天的听讲,和下午的做做业,以竟本懂了
比如:
添加:
string filename = Server.MapPath("~/") + this.TextBox2.Text;
FileStream fs = new FileStream(filename, FileMode.Create, FileAccess.Write, FileShare.None);
StreamWriter sw = new StreamWriter(fs);
sw.Write(this.TextBox1.Text);
sw.Flush();
sw.Close();
fs.Close();
删除:
if ((Directory.GetDirectories(this.TextBox1.Text).Length == 0) && (Directory.GetFiles(this.TextBox1.Text).Length == 0))
{
Directory.Delete(this.TextBox1.Text);
}
else
{
this.Response.Write("目录不为空!");
}
读取:
string filename = Server.MapPath("~/") + this.TextBox2.Text;
FileStream fs = new FileStream(filename, FileMode.Open, FileAccess.Read, FileShare.Read);
StreamReader sr = new StreamReader(fs);
this.TextBox1.Text = sr.ReadToEnd();
sr.Close();
fs.Close();
保存二进制
等。
- 12.14
- 12.14
- 12.14
- 12.14笔记
- 12.14题解
- 12.14笔记
- 12.14日总结
- 12.14Swing 和 JFC
- 12.14.1 JFrame
- 12.14.2JScrollPane
- 12.14培训日记
- 12.14考试总结
- copyright(12.14)
- 今天星期二了(12.14)
- NKOI Round 8(12.14)
- 六级词汇天天练(12.14)
- 12.14(tomcat manager登录验证)
- C++primer5th课后题12.6、12.14、12.19
- 使用 SQL Server 2000 索引视图提高性能1
- 如何查询计算机中的盘符信息
- 某夫知道妻子终于怀孕后
- linux多用户的添加
- 提高上网速度5倍(推荐)
- 12.14
- ASP.NET面试题(推荐_有答案)
- Prim算法与Dijkstra算法的区别
- php面向对象详解5
- VI编辑器实用技巧
- (数据库)完整性
- 移动营业厅称部分SIM卡无法用于iPhone4S
- 深入理解指针函数
- Hadoop 集群 傻瓜式搭建手记 (四) 完结篇