main/bucket: Add a callback function for ast_bucket_file objects