Matt Mackall wrote: > Not an unreasonable thing to do. But is this portable to anything but Linux? > I think *BSD supports it. If d_type is present and not DT_UNKNOWN then it can be relied on; otherwise just fall back to using lstat. J