Don Newton | 98fd881 | 2019-09-23 15:15:02 -0400 | [diff] [blame] | 1 | // Copyright 2009 The Go Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style |
| 3 | // license that can be found in the LICENSE file. |
| 4 | |
Don Newton | e0d34a8 | 2019-11-14 10:58:06 -0500 | [diff] [blame^] | 5 | // +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris |
Don Newton | 98fd881 | 2019-09-23 15:15:02 -0400 | [diff] [blame] | 6 | |
| 7 | package unix |
| 8 | |
Don Newton | e0d34a8 | 2019-11-14 10:58:06 -0500 | [diff] [blame^] | 9 | import "syscall" |
Don Newton | 98fd881 | 2019-09-23 15:15:02 -0400 | [diff] [blame] | 10 | |
| 11 | // ParseDirent parses up to max directory entries in buf, |
| 12 | // appending the names to names. It returns the number of |
| 13 | // bytes consumed from buf, the number of entries added |
| 14 | // to names, and the new names slice. |
| 15 | func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) { |
Don Newton | e0d34a8 | 2019-11-14 10:58:06 -0500 | [diff] [blame^] | 16 | return syscall.ParseDirent(buf, max, names) |
Don Newton | 98fd881 | 2019-09-23 15:15:02 -0400 | [diff] [blame] | 17 | } |