我可以运行以下命令来下载文件“some/path/known_name.json”
def download_file():
try:
file_system_client = FileSystemClient.from_connection_string(...)
full_file_location = "some/path/known_name.json"
target_file_client = file_system_client.get_file_client(full_file_location)
download=target_file_client.download_file()
downloaded_bytes = download.readall()
local_file = open('my_file.json','wb')
local_file.write(downloaded_bytes)
local_file.close()
except Exception as e:
print(e)
我的问题是:当文件名未知但文件类型已知(例如“ different/path/xxx.json”)时,如何从其他路径下载
UYOU
相关分类