本文介绍了我如何为ftpDirectory使用foreach循环的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 foreach ( string f in Directory.GetFiles(( ftp:// me @ localhost / + newFolder))) 错误:给定路径不支持 。 newFolder由子目录和文件组成。解决方案 我认为你不能使用Directory类进行FTP,而是使用FtpWebRequest。 FtpWebRequest类 [ ^ ] foreach (string f in Directory.GetFiles(("ftp://me@localhost/" + newFolder)))Error: Given Path is not supported.newFolder consists of sub directories and files. 解决方案 这篇关于我如何为ftpDirectory使用foreach循环的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
10-27 01:38