mirror of
https://github.com/hanzoai/go-fuse.git
synced 2026-10-30 14:46:18 +00:00
For some reason, the x/sys/ package does not provide unix.Getdents on Darwin, but does provide unix.Getdirentries(), which is a BSD (?) flavor of the same? It takes a basep argument which is ignored. Fixes https://github.com/hanwen/go-fuse/issues/566 Change-Id: Id000000049819d114496fca39cb947fb8bd5c210
12 lines
301 B
Go
12 lines
301 B
Go
// Copyright 2019 the Go-FUSE Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package fs
|
|
|
|
import "golang.org/x/sys/unix"
|
|
|
|
func getdents(fd int, buf []byte) (int, error) {
|
|
return unix.Getdirentries(fd, buf, nil)
|
|
}
|