蜜蜂花园

导航

2010年12月26日

c#文件操作

摘要: 目录操作System.IO 类 目录操作string[] drives = Directory.GetLogicalDrives(); //本地驱动器的名,如:C:\等string path = Directory.GetCurrentDirectory();//获取应用程序的当前工作目录Path.GetFileName(@"c:\dir\file.txt"); //获取子目录的名字,result的结果是file.txtDirectory.GetFiles(路径及文件名) //获取指定目录中的文件名(文件列表)DirectoryInfo di = new DirectoryInfo(@"f:\ 阅读全文

posted @ 2010-12-26 17:13 蜜蜂花园 阅读(211) 评论(0) 推荐(0) 编辑