mirror of
https://github.com/versity/scoutfs-go.git
synced 2026-01-07 12:15:20 +00:00
add FStatMore
This commit is contained in:
@@ -149,9 +149,14 @@ func StatMore(path string) (Stat, error) {
|
||||
}
|
||||
defer f.Close()
|
||||
|
||||
return FStatMore(f)
|
||||
}
|
||||
|
||||
// FStatMore returns scoutfs specific metadata for file handle
|
||||
func FStatMore(f *os.File) (Stat, error) {
|
||||
s := Stat{ValidBytes: uint64(unsafe.Sizeof(Stat{}))}
|
||||
|
||||
_, err = scoutfsctl(f.Fd(), IOCSTATMORE, uintptr(unsafe.Pointer(&s)))
|
||||
_, err := scoutfsctl(f.Fd(), IOCSTATMORE, uintptr(unsafe.Pointer(&s)))
|
||||
if err != nil {
|
||||
return Stat{}, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user