Function s3::delete_s3 [] [src]

pub fn delete_s3(bucket: &Bucket, s3_path: &str)

Delete file from an S3 path

Example:

use s3::{Bucket, delete_s3};
use std::io::prelude::*;
use std::fs::File;

let s3_bucket = &"rust-s3-test";
let aws_access = &"access_key";
let aws_secret = &"secret_key";

let bucket = Bucket::new(
              s3_bucket.to_string(),
              None,
              aws_access.to_string(),
              aws_secret.to_string(),
              None);
let path = &"test.file";
let mut buffer = match File::create(path) {
          Ok(x) => x,
          Err(e) => panic!("{:?}, {}", e, path)
        };
delete_s3(&bucket, &path);