{"action":"created","issue":{"url":"https://api.github.com/repos/Azure/azure-storage-net-data-movement/issues/54","repository_url":"https://api.github.com/repos/Azure/azure-storage-net-data-movement","labels_url":"https://api.github.com/repos/Azure/azure-storage-net-data-movement/issues/54/labels{/name}","comments_url":"https://api.github.com/repos/Azure/azure-storage-net-data-movement/issues/54/comments","events_url":"https://api.github.com/repos/Azure/azure-storage-net-data-movement/issues/54/events","html_url":"https://github.com/Azure/azure-storage-net-data-movement/issues/54","id":190445360,"number":54,"title":"No sample for DownloadDirectoryAsync()","user":{"login":"BuggyLogic","id":7358635,"avatar_url":"https://avatars.githubusercontent.com/u/7358635?v=3","gravatar_id":"","url":"https://api.github.com/users/BuggyLogic","html_url":"https://github.com/BuggyLogic","followers_url":"https://api.github.com/users/BuggyLogic/followers","following_url":"https://api.github.com/users/BuggyLogic/following{/other_user}","gists_url":"https://api.github.com/users/BuggyLogic/gists{/gist_id}","starred_url":"https://api.github.com/users/BuggyLogic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BuggyLogic/subscriptions","organizations_url":"https://api.github.com/users/BuggyLogic/orgs","repos_url":"https://api.github.com/users/BuggyLogic/repos","events_url":"https://api.github.com/users/BuggyLogic/events{/privacy}","received_events_url":"https://api.github.com/users/BuggyLogic/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-11-18T23:20:30Z","updated_at":"2016-12-02T13:35:02Z","closed_at":null,"body":"Any chance you could add a sample for how to use TransferManager.DownloadDirectoryAsync(). That is a scenario you are currently not covering (you have an example for upload, but not download). I'm having some difficulties, and an example would be most welcome."},"comment":{"url":"https://api.github.com/repos/Azure/azure-storage-net-data-movement/issues/comments/264454903","html_url":"https://github.com/Azure/azure-storage-net-data-movement/issues/54#issuecomment-264454903","issue_url":"https://api.github.com/repos/Azure/azure-storage-net-data-movement/issues/54","id":264454903,"user":{"login":"saschagottfried","id":1422627,"avatar_url":"https://avatars.githubusercontent.com/u/1422627?v=3","gravatar_id":"","url":"https://api.github.com/users/saschagottfried","html_url":"https://github.com/saschagottfried","followers_url":"https://api.github.com/users/saschagottfried/followers","following_url":"https://api.github.com/users/saschagottfried/following{/other_user}","gists_url":"https://api.github.com/users/saschagottfried/gists{/gist_id}","starred_url":"https://api.github.com/users/saschagottfried/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saschagottfried/subscriptions","organizations_url":"https://api.github.com/users/saschagottfried/orgs","repos_url":"https://api.github.com/users/saschagottfried/repos","events_url":"https://api.github.com/users/saschagottfried/events{/privacy}","received_events_url":"https://api.github.com/users/saschagottfried/received_events","type":"User","site_admin":false},"created_at":"2016-12-02T13:35:02Z","updated_at":"2016-12-02T13:35:02Z","body":"Since I am having difficulties as well - transfer state shows neither transferred nor skipped file or failure\r\n\r\n```\r\nData movement directory download sample.\r\nFinal transfer state: Transferred bytes: 0; Transfered: 0; Skipped: 0, Failed: 0\r\nFiles in directory http://127.0.0.1:10000/devstoreaccount1/samplecontainer/blobdir/ downloading to . is finished.\r\n\r\n```\r\n\r\nWhat I have done? I just extended the [DataMovementSamples ](https://github.com/Azure/azure-storage-net-data-movement/blob/master/samples/DataMovementSamples/DataMovementSamples/Samples.cs)- since there was no sample covering `DownloadDirectoryAsync`\r\n\r\n```\r\n private static async Task BlobDirectoryDownloadSample()\r\n        {\r\n            string destDirPath = \".\";\r\n            CloudBlobDirectory sourceDir = await Util.GetCloudBlobDirectoryAsync(ContainerName, \"blobdir\");\r\n\r\n            // SearchPattern and Recuresive can be used to determine the files to be transferred from the source directory. The behavior of\r\n            // SearchPattern and Recuresive varies for different source directory types.\r\n            // See https://azure.github.io/azure-storage-net-data-movement for more details.\r\n            //\r\n            // When source is local directory, data movement library matches source files against the SearchPattern as standard wildcards. If \r\n            // recuresive is set to false, only files directly under the source directory will be matched. Otherwise, all files in the\r\n            // sub-directory will be matched as well.\r\n            //\r\n            // In the following case, data movement library will upload png files starting with \"azure\" in the source directory as block blobs,\r\n            // not including the sub-directory.\r\n            DownloadDirectoryOptions options = new DownloadDirectoryOptions()\r\n            {\r\n                SearchPattern = \"*.*\",\r\n                Recursive = true             \r\n            };\r\n\r\n            // Register for transfer event.\r\n            DirectoryTransferContext context = new DirectoryTransferContext();            \r\n\r\n            // Start the upload\r\n            var transferStatus = await TransferManager.DownloadDirectoryAsync(sourceDir, destDirPath, options, context);\r\n\r\n            Console.WriteLine(\"Final transfer state: {0}\", TransferStatusToString(transferStatus));\r\n            Console.WriteLine(\"Files in directory {0} downloading to {1} is finished.\", sourceDir.Uri, destDirPath);\r\n        }\r\n```\r\n\r\nI looked for a test covering TransferManager.DownloadDirectoryAsync(). But I could not find any. I am still investigating my issue, will come back later on ...\r\n\r\nIn the meantime any comment from the developers on this could be helpful. Is there anybody out there?"}}
{"actor":{"display_login":"saschagottfried"}}