随笔分类 -  IO流,文件

.NET代码错误日志设计
摘要:1.首先创建一个类Filesusing System.IO;using System.Security.AccessControl;namespace 命名空间{ public class Files { /// /// 给指定的操作系统用户赋操作权限 /// /// 文件的路径 /// 操作系统用户名 /// 操作权限,枚举型:FullControl,ReadOnly,Write,Modify /// 是否成功 public static bool addpathPower(string pathname, string username, string power) { bool i... 阅读全文
posted @ 2014-03-12 11:43 踏雪寻梦 阅读(349) 评论(0) 推荐(0)
通过指定的“虚拟路径”返回路径下“文件名列表”
摘要:/// <summary> /// 通过指定的虚拟路径返回路径下文件名列表(记得url这个参数前可以写 @"E:\" ) /// </summary> /// <returns></returns> public List<string> DirectoryInfo_ChildName(string url) { List<string> list = new List<string>(); try { DirectoryInfo dir = new DirectoryInfo(url); 阅读全文
posted @ 2013-04-17 14:52 踏雪寻梦 阅读(209) 评论(0) 推荐(0)