{"action":"created","issue":{"url":"https://api.github.com/repos/scottwernervt/cloudstorage/issues/13","repository_url":"https://api.github.com/repos/scottwernervt/cloudstorage","labels_url":"https://api.github.com/repos/scottwernervt/cloudstorage/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/scottwernervt/cloudstorage/issues/13/comments","events_url":"https://api.github.com/repos/scottwernervt/cloudstorage/issues/13/events","html_url":"https://github.com/scottwernervt/cloudstorage/issues/13","id":293951788,"number":13,"title":"Are there ways to work with directories?","user":{"login":"nackjicholson","id":365247,"avatar_url":"https://avatars1.githubusercontent.com/u/365247?v=4","gravatar_id":"","url":"https://api.github.com/users/nackjicholson","html_url":"https://github.com/nackjicholson","followers_url":"https://api.github.com/users/nackjicholson/followers","following_url":"https://api.github.com/users/nackjicholson/following{/other_user}","gists_url":"https://api.github.com/users/nackjicholson/gists{/gist_id}","starred_url":"https://api.github.com/users/nackjicholson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nackjicholson/subscriptions","organizations_url":"https://api.github.com/users/nackjicholson/orgs","repos_url":"https://api.github.com/users/nackjicholson/repos","events_url":"https://api.github.com/users/nackjicholson/events{/privacy}","received_events_url":"https://api.github.com/users/nackjicholson/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-02T16:46:58Z","updated_at":"2018-02-02T20:42:24Z","closed_at":null,"author_association":"NONE","body":"I'm looking for a solution that treats cloud storage systems and local similarly as a filesystem. If I open a Container may I list subdirectories or blobs in that directory? Are there ways to open directory paths as Containers?\r\n\r\nCheers,\r\n\r\nWill"},"comment":{"url":"https://api.github.com/repos/scottwernervt/cloudstorage/issues/comments/362701434","html_url":"https://github.com/scottwernervt/cloudstorage/issues/13#issuecomment-362701434","issue_url":"https://api.github.com/repos/scottwernervt/cloudstorage/issues/13","id":362701434,"user":{"login":"scottwernervt","id":1048949,"avatar_url":"https://avatars2.githubusercontent.com/u/1048949?v=4","gravatar_id":"","url":"https://api.github.com/users/scottwernervt","html_url":"https://github.com/scottwernervt","followers_url":"https://api.github.com/users/scottwernervt/followers","following_url":"https://api.github.com/users/scottwernervt/following{/other_user}","gists_url":"https://api.github.com/users/scottwernervt/gists{/gist_id}","starred_url":"https://api.github.com/users/scottwernervt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scottwernervt/subscriptions","organizations_url":"https://api.github.com/users/scottwernervt/orgs","repos_url":"https://api.github.com/users/scottwernervt/repos","events_url":"https://api.github.com/users/scottwernervt/events{/privacy}","received_events_url":"https://api.github.com/users/scottwernervt/received_events","type":"User","site_admin":false},"created_at":"2018-02-02T20:42:24Z","updated_at":"2018-02-02T20:42:24Z","author_association":"OWNER","body":"> If I open a Container may I list subdirectories or blobs in that directory?\r\n\r\nYou can only list the blobs in the container. A quick test on AWS S3 shows a subdirectory as a blob. I can look into supporting subdirectories so they behave like containers.\r\n\r\n```python\r\n>>> from cloudstorage.drivers.amazon import S3Driver\r\n>>> storage = S3Driver(key='', secret='')\r\n>>> for container in storage:\r\n>>>    for blob in container:\r\n>>>        print(container, blob)\r\n<Container cloudstorage-test S3> <Blob new-folder/ cloudstorage-test S3>\r\n<Container cloudstorage-test S3> <Blob new-folder/tux-aerospace-trans-128x128.ico cloudstorage-test S3>\r\n<Container cloudstorage-test S3> <Blob tux-aerospace-trans-250x250.png cloudstorage-test S3>\r\n```\r\n\r\n> Are there ways to open directory paths as Containers?\r\n\r\nYes, set the container's parent directory as the key for the local storage driver.\r\n\r\n```python\r\nfrom cloudstorage.drivers.local import LocalDriver\r\n\r\n# /mnt/cloudstorage/storage_a/container\r\nstorage_a = LocalDriver(key='/mnt/cloudstorage/storage_a')\r\n# /mnt/cloudstorage/storage_b/container\r\nstorage_b = LocalDriver(key='/mnt/cloudstorage/storage_b')\r\n```"}}
{"actor":{"display_login":"scottwernervt"}}