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 |
| 5 // +build darwin freebsd linux openbsd |
4 | 6 |
5 package os | 7 package os |
6 | 8 |
7 import ( | 9 import ( |
8 "syscall" | 10 "syscall" |
9 ) | 11 ) |
10 | 12 |
11 const ( | 13 const ( |
12 blockSize = 4096 | 14 blockSize = 4096 |
13 ) | 15 ) |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 var nb, nc int | 60 var nb, nc int |
59 nb, nc, names = syscall.ParseDirent(d.buf[d.bufp:d.nbuf], n, nam
es) | 61 nb, nc, names = syscall.ParseDirent(d.buf[d.bufp:d.nbuf], n, nam
es) |
60 d.bufp += nb | 62 d.bufp += nb |
61 n -= nc | 63 n -= nc |
62 } | 64 } |
63 if n >= 0 && len(names) == 0 { | 65 if n >= 0 && len(names) == 0 { |
64 return names, EOF | 66 return names, EOF |
65 } | 67 } |
66 return names, nil | 68 return names, nil |
67 } | 69 } |
LEFT | RIGHT |