GetSpecialFolder equivalent in golang

huangapple go评论73阅读模式
英文:

GetSpecialFolder equivalent in golang

问题

我正在尝试获取Windows的临时文件夹路径,除了固定路径C:\Windows\Temp之外,我想使用类似于VBScript中的GetSpecialFolder的API。

是否有类似的方法可以实现这个功能?

英文:

I'm trying to get the temp folder of windows, other than a fixed path C:\Windows\Temp, I'd like to use some API similar to GetSpecialFolder in VBScript.

Is there anything like that?

答案1

得分: 6

你可以使用os.TempDir()来实现这个功能。

英文:

You use os.TempDir() for that.

huangapple
  • 本文由 发表于 2017年4月19日 10:42:44
  • 转载请务必保留本文链接:https://go.coder-hub.com/43485414.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定