// List folder
Dropbox.authorizedClient!.files.listFolder(path: "/nonexistantpath").response { response, error in
print("*** List folder ***")
if let result = response {
print("Folder contents:")
for entry in result.entries {
print(entry.name)
}
} else if let callError = error {
switch callError {
case .RouteError(let boxed, _):
switch boxed.unboxed {
case .Path(let lookupError):
print("lookupError:")
print(lookupError)
case .Other:
print("Other")
}
default:
print("default")
}
}
}