It is, but it could be clearer, as it鈥檚 not particularly direct about it:
All recursive directory iterators must inspect the entry鈥檚 type. Therefore, the value is stored and its access is guaranteed to be cheap and successful.
When you walk a directory recursively, you have to inspect the entry鈥檚 type to determine whether it鈥檚 a directory or not. Therefore, since that information is already available, walkdir can provide it to the caller as is without another stat call.