Non ti ho suggerito lstats ma stat

int stat(const char *path, struct stat *buf);

e c'è l'esempio in fondo ...