内部方法.

@param string $bucketName bucket名称
@param string $path       文件/目录路径

@return array
333587
private static function statBase($bucketName, $path)
    {
        $path = self::cosUrlEncode($path);
        $expired = self::time() + self::EXPIRED_SECONDS;
        $url = self::generateResUrl($bucketName, $path);
        $sign = Auth::appSign($expired, $bucketName);

        $data = [
            'op' => 'stat',
        ];

        $url = $url.'?'.http_build_query($data);

        $req = [
            'url'     => $url,
            'method'  => 'get',
            'timeout' => self::$timeout,
            'header'  => [
                'Authorization:'.$sign,
            ],
        ];

        return self::sendRequest($req);
    }
29165
public function stat($bucket, $path)
    {
        $path = self::normalizerPath($path);

        return $this->statBase($bucket, $path);
    }
629526
public function getMetadata($path) {
			try {
				return $this->normalizeFileInfo($this->bucket->getFileByName($path));
			} catch (\Exception $e) {
				throw new B2FlysystemException('Error retrieving meta data', B2FlysystemException::B2_SDK_ERROR, $e);
			}
		}
260456
public function getMetadata($path)
    {
        list($ret, $err) = Qiniu_RS_Stat($this->getClient(), $this->bucket, $path);
        if ($err !== null) {
            return false;
        }
        $ret['key'] = $path;
        return $this->normalizeData($ret);
    }
166297
function _getExtensions($cert = null, $path = null)
    {
        $exts = $this->_extensions($cert, $path);
        $extensions = array();

        if (is_array($exts)) {
            foreach ($exts as $extension) {
                $extensions[] = $extension['extnId'];
            }
        }

        return $extensions;
    }
309035
public function buildFrom($bucketName, &$params)
    {
        if (empty($bucketName)) {
            return '';
        }

        $bucketName = $this->quoteBucketName($bucketName, $params);

        return 'FROM ' . $bucketName;
    }
980119
private function delBase($bucket, $path)
    {
        if ($path == "/") {
            return [
                'code'      => Response::COSAPI_PARAMS_ERROR,
                'message'   => 'can not delete bucket using api! go to ' .
                    'http://console.qcloud.com/cos to operate bucket'
            ];
        }

        $path       = self::cosUrlEncode($path);
        $url        = self::generateResUrl($bucket, $path);
        $signature  = $this->createNonreusableSignature($bucket, $path);
        $data       = ['op' => 'delete'];
        $data       = json_encode($data);

        $req = [
            'url'       => $url,
            'method'    => 'post',
            'timeout'   => self::$timeout,
            'data'      => $data,
            'header'    => [
                'Authorization: ' . $signature,
                'Content-Type: application/json',
            ],
        ];

        return self::sendRequest($req);
    }
589444
private function getPath($bucketName = null, $key = null)
    {
        return HttpUtils::appendUri(self::BOS_URL_PREFIX, $bucketName, $key);
    }
918290
public function dropBucket($bucketName)
    {
        $this->beginProfile($token = "    > drop bucket $bucketName ...");

        $this->db->getBucket($bucketName)->drop();

        $this->endProfile($token);
    }
1041917
public function fileDetails($path)
    {
        $path = '/'.ltrim($path, '/');

        return [
            'name'     => basename($path),
            'fullPath' => $path,
            'webPath'  => $this->fileWebPath($path),
            'mimeType' => $this->fileMimeType($path),
            'size'     => $this->fileSize($path),
        ];
    }
1351433
public function determineBucketRegionAsync($bucketName)
    {
        $command = $this->getCommand('HeadBucket', ['Bucket' => $bucketName]);
        $handlerList = clone $this->getHandlerList();
        $handlerList->remove('s3.permanent_redirect');
        $handlerList->remove('signer');
        $handler = $handlerList->resolve();

        return $handler($command)
            ->then(static function (ResultInterface $result) {
                return $result['@metadata']['headers']['x-amz-bucket-region'];
            });
    }
824724
public function statBase($bucket, $path)
    {
        $path       = self::cosUrlEncode($path);
        $expired    = time() + self::EXPIRED_SECONDS;
        $url        = self::generateResUrl($bucket, $path);
        $signature  = $this->createReusableSignature($expired, $bucket);
        $data       = array('op' => 'stat');
        $url        = $url . '?' . http_build_query($data);

        $req = [
            'url'       => $url,
            'method'    => 'get',
            'timeout'   => self::$timeout,
            'header'    => [
                'Authorization: ' . $signature,
            ],
        ];

        return self::sendRequest($req);
    }
1278746
public function getMappingFiles($path)
    {
        $files = $this->files->glob($path.'/*_*.php');

        if ($files === false) {
            return [];
        }

        $files = array_map(function ($file) {
            return str_replace('.php', '', basename($file));
        }, $files);

        return $files;
    }
797769
public function delete($path)
    {
        $result = $this->client->deleteObject($this->bucket, $path);
        if (is_null($result)) {
            return false;
        }

        return true;
    }
472343
public function read($path)
    {
        try {
            $response = $this->forceReadFromCDN()
                ? $this->readFromCDN($path)
                : $this->readFromSource($path);

            return ['contents' => (string) $response];
        } catch (NoSuchKeyException $e) {
            return false;
        } catch (\GuzzleHttp\Exception\ClientException $e) {
            return false;
        }
    }
1187323
protected function _getContents($path) {
		$contents = '';
		try {
			$contents = $this->dropbox->getFile($path);
		} catch (Dropbox_Exception $e) {
			return $this->setError('Dropbox error: '.$e->getMessage());
		}
		return $contents;
	}
73431
protected function getPhpFiles($path)
    {
        if (is_dir($path)) {
            return new RegexIterator(
                new RecursiveIteratorIterator(
                    new RecursiveDirectoryIterator($path, RecursiveDirectoryIterator::SKIP_DOTS),
                    RecursiveIteratorIterator::SELF_FIRST,
                    RecursiveIteratorIterator::CATCH_GET_CHILD // Ignore "Permission denied"
                ),
                '/^.+\.php$/i',
                RecursiveRegexIterator::GET_MATCH
            );
        }
        else {
            return [];
        }
    }