Пример #1
0
        static void Main(string[] args)
        {
            //初始化AK,SK
            Qiniu.Conf.Config.ACCESS_KEY = "Access_Key";
            Qiniu.Conf.Config.SECRET_KEY = "Secret_Key";
            //要测试的空间和key,并且这个key在你空间中存在
            String bucket = "Bucket_Name";
            String key    = "Bucket_key";

            //调用Stat方法
            BucketManager.Stat(bucket, key);
        }
Пример #2
0
        static void Main(string[] args)
        {
            //初始化AK,SK
            Qiniu.Conf.Config.ACCESS_KEY = "Access_Key";
            Qiniu.Conf.Config.SECRET_KEY = "Secret_Key";
            //要测试的空间和key,并且这个key在你空间中存在
            String bucket = "Bucket_Name";
            String key    = "Bucket_key";

            //将文件从文件key移动到文件key2, 可以在不同bucket移动,同空间移动相当于重命名
            String key2 = "yourjavakey";

            //调用Move方法
            BucketManager.Move(bucket, key, bucket, key2);
        }