Skip to content

Instantly share code, notes, and snippets.

@DeanF
Created October 11, 2013 12:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DeanF/ae71bf04c403ee47abfb to your computer and use it in GitHub Desktop.
Save DeanF/ae71bf04c403ee47abfb to your computer and use it in GitHub Desktop.
DownloadFolder for Sharpbox
public static void DownloadFolder(this CloudStorage dropBoxStorage, ICloudDirectoryEntry remoteDir, string targetDir)
{
foreach (ICloudFileSystemEntry fsentry in remoteDir)
{
if (fsentry is ICloudDirectoryEntry)
{
DownloadFolder(dropBoxStorage, fsentry as ICloudDirectoryEntry, Path.Combine(targetDir, fsentry.Name));
}
else
{
dropBoxStorage.DownloadFile(remoteDir,fsentry.Name,Path.Combine(targetDir, fsentry.Name));
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment