public Uri plusName(string name, bool asDir)
{
int size = m_path.sz();
bool isDir = this.isDir() || m_path.isEmpty();
int newSize = isDir ? size + 1 : size;
string[] temp = (string[])m_path.toArray(new string[newSize]);
temp[newSize-1] = name;
Sections t = new Sections();
t.scheme = this.m_scheme;
t.userInfo = this.m_userInfo;
t.host = this.m_host;
t.port = this.m_port;
t.query = emptyQuery();
t.queryStr = null;
t.frag = null;
t.path = new List(Sys.StrType, temp);
t.pathStr = toPathStr(isAbs() || isPathAbs(), t.path, asDir);
return new Uri(t);
}