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

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

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

posted @ 2017-07-19 23:50  公子苏苏苏  阅读(246)  评论(0编辑  收藏  举报