Beispiel #1
0
 public void Moveto(AMeta meta, string path, string name)
 {
     string src = Path.Combine(_Root, meta.GetMeta());
     if (!File.Exists(src))
     {
         return;
     }
     string dst = Path.Combine(path, name);
     if (File.Exists(dst))
     {
         dst = GenDupName(meta.GetMetaPath(), name);
     }
     File.Move(src, dst);
 }
Beispiel #2
0
        public string ShareMeta(AMeta meta)
        {
            ResetParams();
            string url = string.Format(KuaipanServer.SHARE_META, _Root, meta.GetMetaPath());

            PrepareParams();
            AddParam(OAuthConstants.OAUTH_TOKEN, Token.oauth_token);
            SortParam();
            AddParam(OAuthConstants.OAUTH_SIGNATURE, Signature(GenerateBaseString(_Server.RequestTokenUrl)));

            string t = GenBaseParams();
            byte[] r = _Server.Get(url, t);
            if (r == null || r.Length < 1)
            {
                return null;
            }

            t = GetString(r);
            // Jason

            return "";
        }
Beispiel #3
0
 public List<AMeta> ListMeta(AMeta meta)
 {
     string url = string.Format(KuaipanServer.LIST_META, _Root, meta.GetMetaPath());
     return ListMeta(url);
 }
Beispiel #4
0
 public AMeta Copyto(AMeta meta, string dstPath, string dstName)
 {
     File.Copy(meta.GetMetaPath(), Path.Combine(dstPath, dstName));
     return meta;
 }
Beispiel #5
0
 public AMeta Moveto(AMeta meta, string dstPath, string dstName)
 {
     string path = System.IO.Path.Combine(dstPath, dstName);
     if (System.IO.File.Exists(path))
     {
         path = GenDupName(meta, dstPath);
     }
     File.Move(meta.GetMetaPath(), path);
     meta.SetMetaPath(path);
     return meta;
 }
Beispiel #6
0
 public List<AMeta> ListMeta(AMeta meta)
 {
     return ListMeta(meta.GetMetaPath());
 }