首页 > 其他 > 详细

文件常用操作

时间:2016-07-08 10:22:42      阅读:118      评论: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
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!