/// <summary> /// 返回根目录 /// </summary> /// <param name="u"></param> public static void root(User u) { string tpath = ConstValue.userpath + u.GetName() + @"\file\home"; u.SetPath(LogicalParser.parse(tpath, u)); u.SetSinglePath(LogicalParser.singleParse(u)); }
public static User GetInstance(string name) { User newUser = new User(name); newUser.SetPath(LogicalParser.parse(newUser.GetPath(), newUser)); newUser.nowSinglePath = LogicalParser.singleParse(newUser); return(newUser); }
/// <summary> /// 返回上一级目录 /// </summary> /// <param name="u"></param> public static void back(User u) { string tpath = TruepathParser.parse(u); int point = tpath.LastIndexOf(@"\"); tpath = tpath.Substring(0, point); u.SetPath(LogicalParser.parse(tpath, u)); u.SetSinglePath(LogicalParser.singleParse(u)); }