DEV Community

Cover image for Getting the list of files and their info

Getting the list of files and their info

Miradil on January 01, 2024

In this article we will start collecting info about files If you want to know more about command, please read Part 1. If you want to know how we...
Collapse
 
pauljlucas profile image
Paul J. Lucas

No, you can't extend structs like that. It's non-standard, specifically it's a Microsoft extension. You really don't want to write portable code using extensions, especially Microsoft extensions for Linux.

The simplest (and standard) thing to do is simply embed the struct by giving it a name. You can even cheat by casting a pointer to the wrapper to a struct stat* and it will work.