Code

Avoid calling fstat for every imported file (slow!) and instead read the file data...
drwxr-xr-x - contrib