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

返回文件路径中的想要的值

时间:2017-07-20 00:53:39      阅读:141      评论:0      收藏:0      [点我收藏+]

标签:path   nbsp   director   目录   bsp   回文   返回   name   文件路径   

System.IO.Path.GetFileNam(filePath)       //返回带扩展名的文件名 
System.IO.Path.GetFileNameWithoutExtension(filePath)     //返回不带扩展名的文件名 
System.IO.Path.GetDirectoryName(filePath)     //返回文件所在目录

System.IO.Path.GetExtension(filePath)  //返回文件扩展名

返回文件路径中的想要的值

标签:path   nbsp   director   目录   bsp   回文   返回   name   文件路径   

原文地址:http://www.cnblogs.com/suxiaBlogs/p/7208949.html

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