Пример #1
0
        /// <summary>
        /// </summary>
        /// <param name="op"></param>
        /// <param name="pair"></param>
        /// <returns></returns>
        private async Task <CallRet> op2(FileHandle op, EntryPathPair pair)
        {
            string url = string.Format("{0}/{1}/{2}/{3}",
                                       Config.RS_HOST,
                                       OPS[(int)op],
                                       Base64URLSafe.Encode(pair.URISrc),
                                       Base64URLSafe.Encode(pair.URIDest));

            return(await Call(url));
        }
Пример #2
0
 /// <summary>
 ///     移动文件
 /// </summary>
 /// <param name="bucketSrc">文件所属的源空间名称</param>
 /// <param name="keySrc">源key</param>
 /// <param name="bucketDest">目标空间名称</param>
 /// <param name="keyDest">目标key</param>
 /// <returns>见<see cref="CallRet">CallRet</see></returns>
 public async Task <CallRet> Move(EntryPathPair pathPair)
 {
     return(await op2(FileHandle.MOVE, pathPair));
 }
Пример #3
0
 /// <summary>
 ///     复制
 /// </summary>
 /// <param name="bucketSrc">文件所属的空间名称</param>
 /// <param name="keySrc">需要复制的文件key</param>
 /// <param name="bucketDest">复制至目标空间</param>
 /// <param name="keyDest">复制的副本文件key</param>
 /// <returns>见<see cref="CallRet">CallRet</see></returns>
 public async Task <CallRet> Copy(EntryPathPair pathPair)
 {
     return(await op2(FileHandle.COPY, pathPair));
 }