lib/mock.js
function(params, callback) {
        var err = null;

        if (typeof(params) === "object" && params !== null)
        {
            if(typeof(params.Bucket) !== "string" || params.Bucket.length <= 0)
            {
                err = new Error("Mock-AWS-S3: Argument 'params' must contain a 'Bucket' (String) property");
            }
        }
        else {
            err = new Error("Mock-AWS-S3: Argument 'params' must be an Object");
        }

        var opts = _.extend({}, this.defaultOptions, applyBasePath(params));

        if (err !== null) {
            callback(err);
        }

        var bucketPath = opts.basePath || "";
        bucketPath += opts.Bucket;

        fs.remove(bucketPath, function(err) {
            return callback(err);
        });
	}
function(params, callback) {
        var err = null;

        if (typeof(params) === "object" && params !== null)
        {
            if(typeof(params.Bucket) !== "string" || params.Bucket.length <= 0)
            {
                err = new Error("Mock-AWS-S3: Argument 'params' must contain a 'Bucket' (String) property");
            }
        }
        else {
            err = new Error("Mock-AWS-S3: Argument 'params' must be an Object");
        }

        var opts = _.extend({}, this.defaultOptions, applyBasePath(params));

        if (err !== null) {
            callback(err);
        }

        var bucketPath = opts.basePath || "";
        bucketPath += opts.Bucket;

        fs.remove(bucketPath, function(err) {
            return callback(err);
        });
	}
function ( params , callback ) { var err = null ; if ( typeof ( params ) === "object" && params !== null ) { if ( typeof ( params . Bucket ) !== "string" || params . Bucket . length <= 0 ) { err = new Error ( "Mock-AWS-S3: Argument 'params' must contain a 'Bucket' (String) property" ) ; } } else { err = new Error ( "Mock-AWS-S3: Argument 'params' must be an Object" ) ; } var opts = _ . extend ( { } , this . defaultOptions , applyBasePath ( params ) ) ; if ( err !== null ) { callback ( err ) ; } var bucketPath = opts . basePath || "" ; bucketPath += opts . Bucket ; fs . remove ( bucketPath , function ( err ) { return callback ( err ) ; } ) ; }
Deletes a bucket. Behaviour as createBucket
@param params {Bucket: bucketName}. Name of bucket to delete
@param callback
@returns void
Deletes a bucket . Behaviour as createBucket