What determines the return value of Path.GetTempPath()?

后端 未结 6 411
忘了有多久
忘了有多久 2020-12-08 13:20

Currently, I use Path.GetTempPath() to figure out where to write my log files, but recently I came across a user\'s machine where the path returned was not what

6条回答
  •  渐次进展
    2020-12-08 13:36

    If you are using C# on MacOS using Mono Framework then value returned by Path.GetTempPath() is value of environment variable TMPDIR.

    Running echo $TMPDIR usually returns value like :

    /var/folders/{2 character random-string}/{random-string}/T
    

提交回复
热议问题