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); }
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 ""; }
public List<AMeta> ListMeta(AMeta meta) { string url = string.Format(KuaipanServer.LIST_META, _Root, meta.GetMetaPath()); return ListMeta(url); }
public AMeta Copyto(AMeta meta, string dstPath, string dstName) { File.Copy(meta.GetMetaPath(), Path.Combine(dstPath, dstName)); return meta; }
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; }
public List<AMeta> ListMeta(AMeta meta) { return ListMeta(meta.GetMetaPath()); }