src/S3/StreamWrapper.php
private function createBucket($path, array $params)
    {
        if ($this->getClient()->doesBucketExist($params['Bucket'])) {
            return $this->triggerError("Bucket already exists: {$path}");
        }

        return $this->boolCall(function () use ($params, $path) {
            $this->getClient()->createBucket($params);
            $this->clearCacheKey($path);
            return true;
        });
    }
private function createBucket($path, array $params)
    {
        if ($this->getClient()->doesBucketExist($params['Bucket'])) {
            return $this->triggerError("Bucket already exists: {$path}");
        }

        return $this->boolCall(function () use ($params, $path) {
            $this->getClient()->createBucket($params);
            $this->clearCacheKey($path);
            return true;
        });
    }
private function createBucket ( $ path , array $ params ) { if ( $ this -> getClient ( ) -> doesBucketExist ( $ params [ 'Bucket' ] ) ) { return $ this -> triggerError ( "Bucket already exists: {$path}" ) ; } return $ this -> boolCall ( function ( ) use ( $ params , $ path ) { $ this -> getClient ( ) -> createBucket ( $ params ) ; $ this -> clearCacheKey ( $ path ) ; return true ; } ) ; }
Creates a bucket for the given parameters.

@param string $path   Stream wrapper path
@param array  $params A result of StreamWrapper::withPath()

@return bool Returns true on success or false on failure
Creates a bucket for the given parameters .