摘要: string filePath = "C:\\1.txt"; string str = "获取文件的全路径:" + Path.GetFullPath(filePath); //-->C:1.txt str = "获取文件所在的目录:" + Path.GetDirectoryName(filePath 阅读全文
posted @ 2019-05-25 13:53 搬砖的L先生 阅读(9840) 评论(0) 推荐(1)
摘要: List<String> listFile = new List<String>(); public void director(string path) { //绑定到指定的文件夹目录 DirectoryInfo dir = new DirectoryInfo(path); //检索表示当前目录的 阅读全文
posted @ 2019-05-25 12:00 搬砖的L先生 阅读(512) 评论(0) 推荐(0)