blob: 4407c505a369c83e8ef95c21b2607dd32badfa6a [file] [log] [blame]
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07001// 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
Girish Gowdra161d27a2021-05-05 12:01:44 -07005// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07006
7package unix
8
Girish Gowdra161d27a2021-05-05 12:01:44 -07009import "syscall"
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070010
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.
15func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) {
Girish Gowdra161d27a2021-05-05 12:01:44 -070016 return syscall.ParseDirent(buf, max, names)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070017}