Single-writer controller with a select loop that offers jobs and accepts results simultaneously, so bounded channels cannot deadlock. statx/fstatat relative to the directory fd on Linux/macOS, portable fallback elsewhere. Hard links counted once, symlink loops detected, virtual filesystems skipped, errors classified and surfaced.
13 lines
195 B
Go
13 lines
195 B
Go
package platform
|
|
|
|
import (
|
|
"os"
|
|
"syscall"
|
|
)
|
|
|
|
func fillSys(m *Meta, fi os.FileInfo) {
|
|
if d, ok := fi.Sys().(*syscall.Win32FileAttributeData); ok {
|
|
m.BTime = d.CreationTime.Nanoseconds()
|
|
}
|
|
}
|