码迷,mamicode.com
首页 > 其他好文 > 详细

文件常用操作

时间:2016-07-08 10:22:52      阅读:171      评论:0      收藏:0      [点我收藏+]

标签:

从绝对路径提取文件名

string fullPath="D:\\xxx\123.bmp";
Path.GetFileName(strFilePath);

获取文件列表

string[] fileName = GetFileNameList(path, @".*\.bmp");

获取文件夹列表

string[] subFolder = Directory.GetDirectories(path);

删除非空文件夹

Directory.Delete(path, true);

文件常用操作

标签:

原文地址:http://www.cnblogs.com/xieqianli/p/5652210.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!