packagelongpathimport("path/filepath""strings")// LongAbs makes a path absolute and returns it in NT long path form.funcLongAbs(pathstring)(string,error){ifstrings.HasPrefix(path,`\\?\`)||strings.HasPrefix(path,`\\.\`){returnpath,nil}if!filepath.IsAbs(path){absPath,err:=filepath.Abs(path)iferr!=nil{return"",err}path=absPath}ifstrings.HasPrefix(path,`\\`){return`\\?\UNC\`+path[2:],nil}return`\\?\`+path,nil}