Check if a file exists
Updated at:2025-11-03
Users can check if a file exists through the following operations:
Python
1from baidubce import exception
2try:
3 response = bos_client.get_object_meta_data(bucket_name, object_key)
4 print("Get meta:{}",response.metadata)
5except exception.BceError as e:
6 print(e)
