Created
October 11, 2013 12:09
-
-
Save DeanF/ae71bf04c403ee47abfb to your computer and use it in GitHub Desktop.
DownloadFolder for Sharpbox
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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