public static function listBuckets($detailed = false)
        {
            $rest = new S3Request('GET', '', '', self::$endpoint);
            $rest = $rest->getResponse();

            if ($rest->error === false && $rest->code !== 200) {
                $rest->error = array('code' => $rest->code, 'message' => 'Unexpected HTTP status');
            }

            if ($rest->error !== false) {
                self::__triggerError(sprintf("S3::listBuckets(): [%s] %s", $rest->error['code'],
                $rest->error['message']), __FILE__, __LINE__);

                return false;
            }

            $results = array();
            if (!isset($rest->body->Buckets)) {
                return $results;
            }

            if ($detailed) {
                if (isset($rest->body->Owner, $rest->body->Owner->ID, $rest->body->Owner->DisplayName)) {
                    $results['owner'] = array(
                        'id' => (string)$rest->body->Owner->ID,
                        'name' => (string)$rest->body->Owner->ID
                    );
                }

                $results['buckets'] = array();

                foreach ($rest->body->Buckets->Bucket as $b) {
                    $results['buckets'][] = array(
                        'name' => (string)$b->Name,
                        'time' => strtotime((string)$b->CreationDate)
                    );
                }
            } else {
                foreach ($rest->body->Buckets->Bucket as $b) {
                    $results[] = (string)$b->Name;
                }
            }

            return $results;
        }