我正在尝试获取远程服务器的所有目录。
例如:
path: "\\Servename\folder"
- 它有效!
path: "\\Servename"
- 错误
我试过这个:
DirectoryInfo dir = new DirectoryInfo (@"\\SERVERNAME"); <- Error happens here
//Get Directories from \\SERVERNAME
DirectoryInfo[] dirInfos = dir.GetDirectories();
错误:ERROR: The UNC path should be of the form \\server\share