func simplifyPath(path string) string {
pathList := strings.Split(path, "/")
queue := make([]string, 0)
for _,item:=range pathList{
// ..表示进入上一层目录,移除掉队尾元素
if item==".."{
if len(queue)>0{
queue=queue[:len(queue)-1]
}
}else if item!=""&& item!="."{
// 既不是空格也不是.就入队
queue=append(queue,item)
}
}
return fmt.Sprintf("/%s",strings.Join(queue,"/"))
}