public void MoveTest() { RSClient target = new RSClient(); // TODO: 初始化为适当的值 string key = NewKey; EntryPathPair pathPair = new EntryPathPair(Bucket, tmpKeys[0], key); ; // TODO: 初始化为适当的值 CallRet actual; //YES actual = target.Move(pathPair); if (actual.OK) { tmpKeys [0] = key; } Assert.IsTrue(actual.OK, "MoveTest Failure"); }
private void button1_Click(object sender, EventArgs e) { label5.Visible = false; label6.Visible = false; Console.WriteLine("\n===> Move {0}:{1} To {2}:{3}", textBox1.Text.ToString().Trim(), textBox2.Text.ToString().Trim(), textBox3.Text.ToString().Trim(), textBox4.Text.ToString().Trim()); RSClient client = new RSClient(); new EntryPathPair(textBox1.Text.ToString().Trim(), textBox2.Text.ToString().Trim(), textBox3.Text.ToString().Trim(), textBox4.Text.ToString().Trim()); CallRet ret = client.Move(new EntryPathPair(textBox1.Text.ToString().Trim(), textBox2.Text.ToString().Trim(), textBox3.Text.ToString().Trim(), textBox4.Text.ToString().Trim())); if (ret.OK) { label5.Visible=true; } else { label6.Visible = true; } }
/// <summary> /// 移动单个文件 /// </summary> /// <param name="bucketSrc">需要移动的文件所在的空间名</param> /// <param name="keySrc">需要移动的文件</param> /// <param name="bucketDest">目标文件所在的空间名</param> /// <param name="keyDest">目标文件key</param> public static void Move(string bucketSrc, string keySrc, string bucketDest, string keyDest) { Console.WriteLine("\n===> Move {0}:{1} To {2}:{3}", bucketSrc, keySrc, bucketDest, keyDest); RSClient client = new RSClient(); new EntryPathPair(bucketSrc, keySrc, bucketDest, keyDest); CallRet ret = client.Move(new EntryPathPair(bucketSrc, keySrc, bucketDest, keyDest)); if (ret.OK) { Console.WriteLine("Move OK"); } else { Console.WriteLine("Failed to Move"); } }