Ejemplo n.º 1
0
 public static void RSDel(string bucket,string key)
 {
     RSClient target = new RSClient(); // TODO: 初始化为适当的值
     EntryPath scope = new EntryPath(bucket,key); // TODO: 初始化为适当的值
     CallRet actual;
     actual = target.Delete(scope);
 }
Ejemplo n.º 2
0
        public static bool Delete(string bucket_name, string key)
        {
            //实例化一个RSClient对象,用于操作BucketManager里面的方法
            RSClient client = new RSClient();
            CallRet ret = client.Delete(new EntryPath(bucket_name, key));

            return ret.OK;
        }
Ejemplo n.º 3
0
        public int DeleteAttachment(string key)
        {
            Config.Init();
            String bucket = System.Configuration.ConfigurationManager.AppSettings["QN-Bucket"] ?? "zngc-intfactory";
            //实例化一个RSClient对象,用于操作BucketManager里面的方法
            RSClient client = new RSClient();
            CallRet ret = client.Delete(new EntryPath(bucket, key));

            return ret.OK ? 1 : 0;
        }
Ejemplo n.º 4
0
 /// <summary>
 /// 删除单个文件
 /// </summary>
 /// <param name="bucket">文件所在的空间名</param>
 /// <param name="key">文件key</param>
 public static void Delete(string bucket, string key)
 {
     Console.WriteLine("\n===> Delete {0}:{1}", bucket, key);
     RSClient client = new RSClient();
     CallRet ret = client.Delete(new EntryPath(bucket, key));
     if (ret.OK)
     {
         Console.WriteLine("Delete OK");
     }
     else
     {
         Console.WriteLine("Failed to delete");
     }
 }
Ejemplo n.º 5
0
 public bool Delete(string key)
 {
     RSClient client = new RSClient();
     CallRet ret = client.Delete(new EntryPath(Bucket, key));
     if(ret.OK)
     {
         return true;
     }
     else
     {
         return false;
     }
 }