当运行 Windows 窗体应用程序的用户无权访问该文件夹时,有没有办法检查(UNIX)网络文件夹是否存在?
我正在使用以下方法,但似乎由于我无权访问该网络文件夹,.NET 认为它不存在,因此该方法始终返回 false:
Private Function DoesUnixDirectoryExist() As Boolean
        Dim bRet As Boolean = False
        Dim dirInfo As New DirectoryInfo("\\unix\dir\here\")
        Try
            If dirInfo.Exists Then
                bRet = True
            End If
        Catch ex As Exception
            MsgBox(ex.Message)
        End Try
        Return bRet
    End Function
谢谢你的帮助!