我可以使用 dropnet API 成功连接到 Dropbox。我想检查一个目录(路径)是否存在。一定有比将其作为错误处理更好的方法吗?
private void LoadContents()
{
string _path = null;
//_path = "/";
_path = "/PathDoesNotExist";
_client.GetMetaDataAsync(_path, (response) =>
{
MessageBox.Show(response.Contents.Count(c => c.Is_Dir) + " Folders found.");
},
(error) =>
{
MessageBox.Show(error.Message);
});
}