如果通过GetInfo将SvnInfoArgs.ThrowOnError设置为false
这样的话,代码块中所有抛出的异常都意味着文件夹或者文件不存在.
public static bool CheckSvnPath(string strSvnPath)
{
using (SvnClient client = new SvnClient())
{
Collection<SvnInfoEventArgs> info;
// Exception:new SvnInfoArgs { ThrowOnError = false }
// returnCode:「true」&「false」
bool checkFlg =
client.GetInfo(new Uri(strSvnPath), new SvnInfoArgs { ThrowOnError = false }, out info);
return checkFlg;
}
}