Files
go-fuse/fuse/direntry_darwin.go
Han-Wen Nienhuys 3c1267936f fuse: add direntry.nameLength() and use it for parsing
This is more likely to be correct on Darwin/FreeBSD.

Change-Id: Id0000000025ed0dc17034a63b38ff5effa4b8402
2025-04-28 06:33:26 +00:00

20 lines
444 B
Go

// Copyright 2024 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 fuse
// Like syscall.Dirent, but without the [256]byte name.
type dirent struct {
Ino uint64
Off int64
Reclen uint16
Namlen uint16
Type uint8
Name [1]uint8 // align to 4 bytes for 32 bits.
}
func (de *dirent) nameLength() int {
return int(de.Namlen)
}