aboutsummaryrefslogtreecommitdiff
path: root/internal/syscallcompat/sys_linux.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2021-05-23 12:00:09 +0200
committerJakob Unterwurzacher2021-05-26 13:17:56 +0200
commit1b3c3b1347ef711ec38bb4c5cb14661035faf2ce (patch)
tree663aa26d1acef54045d526c2c4905b23045fe37a /internal/syscallcompat/sys_linux.go
parent7d72baca69825a83487728e000596241f4ac88fe (diff)
syscallcompat: add GetdentsSpecial()
GetdentsSpecial calls then Getdents syscall, with normal entries and "." / ".." split into two slices.
Diffstat (limited to 'internal/syscallcompat/sys_linux.go')
-rw-r--r--internal/syscallcompat/sys_linux.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/internal/syscallcompat/sys_linux.go b/internal/syscallcompat/sys_linux.go
index 46d039c..36ce7d5 100644
--- a/internal/syscallcompat/sys_linux.go
+++ b/internal/syscallcompat/sys_linux.go
@@ -244,8 +244,15 @@ func UtimesNanoAtNofollow(dirfd int, path string, a *time.Time, m *time.Time) (e
return err
}
-// Getdents syscall.
+// Getdents syscall with "." and ".." filtered out.
func Getdents(fd int) ([]fuse.DirEntry, error) {
+ entries, _, err := getdents(fd)
+ return entries, err
+}
+
+// GetdentsSpecial calls the Getdents syscall,
+// with normal entries and "." / ".." split into two slices.
+func GetdentsSpecial(fd int) (entries []fuse.DirEntry, entriesSpecial []fuse.DirEntry, err error) {
return getdents(fd)
}