1 package reaper 2 3 import "hash/fnv" 4 5 // GetPathUnderlyingDeviceID on Darwin falls back to an FNV hash of the path. 6 // Identical paths still get the same ID, so deduplication works correctly. 7 func GetPathUnderlyingDeviceID(p string) (uint64, error) { 8 h := fnv.New64a() 9 _, _ = h.Write([]byte(p)) 10 return h.Sum64(), nil 11 } 12