LEFT | RIGHT |
(no file at all) | |
1 // Copyright 2009 The Go Authors. All rights reserved. | 1 // Copyright 2009 The Go Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style | 2 // Use of this source code is governed by a BSD-style |
3 // license that can be found in the LICENSE file. | 3 // license that can be found in the LICENSE file. |
4 | 4 |
5 // +build darwin dragonfly freebsd linux netbsd openbsd | 5 // +build darwin dragonfly freebsd linux netbsd openbsd solaris |
6 | 6 |
7 package os | 7 package os |
8 | 8 |
9 import ( | 9 import ( |
10 "runtime" | 10 "runtime" |
11 "sync/atomic" | 11 "sync/atomic" |
12 "syscall" | 12 "syscall" |
13 ) | 13 ) |
14 | 14 |
15 // File represents an open file descriptor. | 15 // File represents an open file descriptor. |
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 } | 283 } |
284 | 284 |
285 // TempDir returns the default directory to use for temporary files. | 285 // TempDir returns the default directory to use for temporary files. |
286 func TempDir() string { | 286 func TempDir() string { |
287 dir := Getenv("TMPDIR") | 287 dir := Getenv("TMPDIR") |
288 if dir == "" { | 288 if dir == "" { |
289 dir = "/tmp" | 289 dir = "/tmp" |
290 } | 290 } |
291 return dir | 291 return dir |
292 } | 292 } |
LEFT | RIGHT |