public static string GetRecycleByPath(string s) { string name = System.IO.File.Exists(s) ? System.IO.Path.GetFileName(s) : new System.IO.DirectoryInfo(s).Name; string dst = CfgPath.GetRecycleName(name); return(dst); }
public void Run() { string src = CfgPath.GetDirByTag(Tag);//删除目录,不需要再这儿创建目录 if (Directory.Exists(src)) { string dst = CfgPath.GetRecycleName(Tag); try { Directory.Move(src, dst); } catch (Exception e) { Logger.E(e); } } }