libgocryptfs/internal/syscallcompat/getdents_other.go
Jakob Unterwurzacher e50a6a57e5 syscallcompat: implement Getdents()
The Readdir function provided by os is inherently slow because
it calls Lstat on all files.

Getdents gives us all the information we need, but does not have
a proper wrapper in the stdlib.

Implement the "Getdents()" wrapper function that calls
syscall.Getdents() and parses the returned byte blob to a
fuse.DirEntry slice.
2017-08-15 19:03:57 +02:00

18 lines
307 B
Go

// +build !linux
package syscallcompat
import (
"log"
"github.com/hanwen/go-fuse/fuse"
)
// HaveGetdents is true if we have a working implementation of Getdents
const HaveGetdents = false
func Getdents(dir string) ([]fuse.DirEntry, error) {
log.Panic("only implemented on Linux")
return nil, nil
}