public delete ( string bucket, string key ) : Qiniu.Http.HttpResult | ||
bucket | string | |
key | string | |
Résultat | Qiniu.Http.HttpResult |
public void bktMgrTest() { //Settings.load(); Settings.LoadFromFile(); string testResUrl = "http://test.fengyh.cn/qiniu/files/hello.txt"; Mac mac = new Mac(Settings.AccessKey, Settings.SecretKey); BucketManager target = new BucketManager(mac); target.fetch(testResUrl, Settings.Bucket, "test_BucketManager.txt"); target.stat(Settings.Bucket, "test_BucketManager.txt"); target.copy(Settings.Bucket, "test_BucketManager.txt", Settings.Bucket, "copy_BucketManager.txt", true); target.move(Settings.Bucket, "copy_BucketManager.txt", Settings.Bucket, "move_BucketManager.txt", true); target.delete(Settings.Bucket, "test_BucketManager.txt"); DomainsResult domainsResult = target.domains(Settings.Bucket); BucketsResult bucketsResult = target.buckets(); }
/// <summary> /// 删除空间中指定文件 /// </summary> public static void delete() { Mac mac = new Mac(Settings.AccessKey, Settings.SecretKey); string bucket = "BUCKET"; string key = "KEY"; BucketManager bm = new BucketManager(mac); HttpResult result = bm.delete(bucket, key); }