// Rmdir deletes the bucket if the fs is at the root
//
// Returns an error if it isn't empty
Rmdir deletes the bucket if the fs is at the root

Returns an error if it isn't empty
// Rmdir deletes the bucket if the fs is at the root // // Returns an error if it isn ' t empty
func (f *Fs) Rmdir(dir string) error {
	f.bucketOKMu.Lock()
	defer f.bucketOKMu.Unlock()
	if f.root != "" || dir != "" {
		return nil
	}
	req := s3.DeleteBucketInput{
		Bucket: &f.bucket,
	}
	_, err := f.c.DeleteBucket(&req)
	if err == nil {
		f.bucketOK = false
		f.bucketDeleted = true
	}
	return err
}
func ( f * Fs ) Rmdir ( dir string ) error { f . bucketOKMu . Lock ( ) defer f . bucketOKMu . Unlock ( ) if f . root != " " || dir != " " { return nil } req := s3 . DeleteBucketInput { Bucket : & f . bucket , } _ , err := f . c . DeleteBucket ( & req ) if err == nil { f . bucketOK = false f . bucketDeleted = true } return err }
Rmdir deletes the bucket if the fs is at the root
Rmdir deletes the bucket if the fs is at the root