protected virtual Status EnterDirectory(ref Component source, MString name) { var dir = source.GetDirectory(name); if (dir == null) { return(Status.Error_Path_Not_Found); } else { source = dir; return(Status.Succeed); } }
protected override Status EnterDirectory(ref Component source, MString name) { if (source.GetFile(name) != null) { return(Status.Error_Path_Already_Exist); } VsDirectory child = source.GetDirectory(name); if (child == null) { child = new VsDirectory(name); source.Add(child); } source = child; return(Status.Succeed); }