我要列出Azure存储帐户上共享的目录和文件。
代码:
file_service = FileService(account_name="xxx",account_key="***")
lst = file_service.list_directories_and_files('metrics')
for i in lst:
print(i)
结果:
<azure.storage.file.models.Directory object at 0x000001DF30FF3278>
如何访问此对象的数据?在
文档中说这个方法的返回是一个生成器。在
谢谢!在
看一下这个对象的文档:https://azure-storage.readthedocs.io/en/latest/_modules/azure/storage/file/models.html#Directory,您可以打印这个对象的属性。在
例如
它应该打印目录或文件的名称。在
完整的文档可以在这里找到:https://azure-storage.readthedocs.io/en/latest/。在
相关问题 更多 >
编程相关推荐