use crate::clouds::aws::s3;
use crate::common::*;
#[instrument(level = "trace")]
pub(crate) async fn prepare_as_destination_helper(
s3_url: Url,
if_exists: IfExists,
) -> Result<()> {
if if_exists == IfExists::Overwrite {
s3::rmdir(&s3_url).await
} else {
Err(format_err!(
"must specify `overwrite` for {} destination",
s3_url,
))
}
}