C# Class Qiniu.Storage.BucketManager

Exibir arquivo Open project: qiniu/csharp-sdk Class Usage Examples

Public Methods

Method Description
BucketManager ( Mac mac ) : System.Collections.Generic
batch ( string ops ) : Qiniu.Http.HttpResult
buckets ( ) : BucketsResult
cdnRefresh ( List urls, List dirs ) : CdnRefreshResult
chgm ( string bucket, string key, string mimeType ) : Qiniu.Http.HttpResult
chgmOp ( string bucket, string key, string mimeType ) : string
copy ( string srcBucket, string srcKey, string destBucket, string destKey ) : Qiniu.Http.HttpResult
copy ( string srcBucket, string srcKey, string destBucket, string destKey, bool force ) : Qiniu.Http.HttpResult
copyOp ( string srcBucket, string srcKey, string destBucket, string destKey ) : string
copyOp ( string srcBucket, string srcKey, string destBucket, string destKey, bool force ) : string
delete ( string bucket, string key ) : Qiniu.Http.HttpResult
deleteOp ( string bucket, string key ) : string
domains ( string bucket ) : DomainsResult
fetch ( string remoteResUrl, string bucket, string key ) : FetchResult
fetchOp ( string url, string bucket, string key ) : string
listFiles ( string bucket, string prefix, string marker, int limit, string delimiter ) : ListFilesResult

获取空间文件列表 listFiles(bucket, prefix, marker, limit, delimiter) bucket: 目标空间名称 prefix: 返回指定文件名前缀的文件列表(prefix可设为null) marker: 考虑到设置limit后返回的文件列表可能不全(需要重复执行listFiles操作) 执行listFiles操作时使用marker标记来追加新的结果 特别注意首次执行listFiles操作时marker为null limit: 每次返回结果所包含的文件总数限制(limit<=1000,建议值100) delimiter: 分隔符,比如-或者/等等,可以模拟作为目录结构(参考下述示例) 假设指定空间中有2个文件 fakepath/1.txt fakepath/2.txt 现设置分隔符delimiter = / 得到返回结果items =[],commonPrefixes = [fakepath/] 然后调整prefix = fakepath/ delimiter = null 得到所需结果items = [1.txt,2.txt] 于是可以在本地先创建一个目录fakepath,然后在该目录下写入items中的文件

move ( string srcBucket, string srcKey, string destBucket, string destKey ) : Qiniu.Http.HttpResult
move ( string srcBucket, string srcKey, string destBucket, string destKey, bool force ) : Qiniu.Http.HttpResult
moveOp ( string srcBucket, string srcKey, string destBucket, string destKey ) : string
moveOp ( string srcBucket, string srcKey, string destBucket, string destKey, bool force ) : string
prefetch ( string bucket, string key ) : Qiniu.Http.HttpResult
prefetchOp ( string bucket, string key ) : string
stat ( string bucket, string key ) : Qiniu.Storage.Model.StatResult
statOp ( string bucket, string key ) : string
updateLifecycle ( string bucket, string key, int deleteAfterDays ) : Qiniu.Http.HttpResult
updateLifecycleOp ( string bucket, string key, int deleteAfterDays ) : string

Method Details

BucketManager() public method

public BucketManager ( Mac mac ) : System.Collections.Generic
mac Qiniu.Util.Mac
return System.Collections.Generic

batch() public method

public batch ( string ops ) : Qiniu.Http.HttpResult
ops string
return Qiniu.Http.HttpResult

buckets() public method

public buckets ( ) : BucketsResult
return Qiniu.Storage.Model.BucketsResult

cdnRefresh() public method

public cdnRefresh ( List urls, List dirs ) : CdnRefreshResult
urls List
dirs List
return Qiniu.Storage.Model.CdnRefreshResult

chgm() public method

public chgm ( string bucket, string key, string mimeType ) : Qiniu.Http.HttpResult
bucket string
key string
mimeType string
return Qiniu.Http.HttpResult

chgmOp() public method

public chgmOp ( string bucket, string key, string mimeType ) : string
bucket string
key string
mimeType string
return string

copy() public method

public copy ( string srcBucket, string srcKey, string destBucket, string destKey ) : Qiniu.Http.HttpResult
srcBucket string
srcKey string
destBucket string
destKey string
return Qiniu.Http.HttpResult

copy() public method

public copy ( string srcBucket, string srcKey, string destBucket, string destKey, bool force ) : Qiniu.Http.HttpResult
srcBucket string
srcKey string
destBucket string
destKey string
force bool
return Qiniu.Http.HttpResult

copyOp() public method

public copyOp ( string srcBucket, string srcKey, string destBucket, string destKey ) : string
srcBucket string
srcKey string
destBucket string
destKey string
return string

copyOp() public method

public copyOp ( string srcBucket, string srcKey, string destBucket, string destKey, bool force ) : string
srcBucket string
srcKey string
destBucket string
destKey string
force bool
return string

delete() public method

public delete ( string bucket, string key ) : Qiniu.Http.HttpResult
bucket string
key string
return Qiniu.Http.HttpResult

deleteOp() public method

public deleteOp ( string bucket, string key ) : string
bucket string
key string
return string

domains() public method

public domains ( string bucket ) : DomainsResult
bucket string
return Qiniu.Storage.Model.DomainsResult

fetch() public method

public fetch ( string remoteResUrl, string bucket, string key ) : FetchResult
remoteResUrl string
bucket string
key string
return Qiniu.Storage.Model.FetchResult

fetchOp() public method

public fetchOp ( string url, string bucket, string key ) : string
url string
bucket string
key string
return string

listFiles() public method

获取空间文件列表 listFiles(bucket, prefix, marker, limit, delimiter) bucket: 目标空间名称 prefix: 返回指定文件名前缀的文件列表(prefix可设为null) marker: 考虑到设置limit后返回的文件列表可能不全(需要重复执行listFiles操作) 执行listFiles操作时使用marker标记来追加新的结果 特别注意首次执行listFiles操作时marker为null limit: 每次返回结果所包含的文件总数限制(limit<=1000,建议值100) delimiter: 分隔符,比如-或者/等等,可以模拟作为目录结构(参考下述示例) 假设指定空间中有2个文件 fakepath/1.txt fakepath/2.txt 现设置分隔符delimiter = / 得到返回结果items =[],commonPrefixes = [fakepath/] 然后调整prefix = fakepath/ delimiter = null 得到所需结果items = [1.txt,2.txt] 于是可以在本地先创建一个目录fakepath,然后在该目录下写入items中的文件
public listFiles ( string bucket, string prefix, string marker, int limit, string delimiter ) : ListFilesResult
bucket string
prefix string
marker string
limit int
delimiter string
return Qiniu.Storage.Model.ListFilesResult

move() public method

public move ( string srcBucket, string srcKey, string destBucket, string destKey ) : Qiniu.Http.HttpResult
srcBucket string
srcKey string
destBucket string
destKey string
return Qiniu.Http.HttpResult

move() public method

public move ( string srcBucket, string srcKey, string destBucket, string destKey, bool force ) : Qiniu.Http.HttpResult
srcBucket string
srcKey string
destBucket string
destKey string
force bool
return Qiniu.Http.HttpResult

moveOp() public method

public moveOp ( string srcBucket, string srcKey, string destBucket, string destKey ) : string
srcBucket string
srcKey string
destBucket string
destKey string
return string

moveOp() public method

public moveOp ( string srcBucket, string srcKey, string destBucket, string destKey, bool force ) : string
srcBucket string
srcKey string
destBucket string
destKey string
force bool
return string

prefetch() public method

public prefetch ( string bucket, string key ) : Qiniu.Http.HttpResult
bucket string
key string
return Qiniu.Http.HttpResult

prefetchOp() public method

public prefetchOp ( string bucket, string key ) : string
bucket string
key string
return string

stat() public method

public stat ( string bucket, string key ) : Qiniu.Storage.Model.StatResult
bucket string
key string
return Qiniu.Storage.Model.StatResult

statOp() public method

public statOp ( string bucket, string key ) : string
bucket string
key string
return string

updateLifecycle() public method

public updateLifecycle ( string bucket, string key, int deleteAfterDays ) : Qiniu.Http.HttpResult
bucket string
key string
deleteAfterDays int
return Qiniu.Http.HttpResult

updateLifecycleOp() public method

public updateLifecycleOp ( string bucket, string key, int deleteAfterDays ) : string
bucket string
key string
deleteAfterDays int
return string