Check if a file exists
Updated at:2025-11-03
Users can check if a file exists through the following operations:
Ruby
1begin
2 client.get_object_meta_data(bucket_name, object_name)
3rescue BceServerException => e
4 puts "#{object_name} not exist!" if e.status_code == 404
5end
