Hello and thanks for reading.
您好,感谢您的阅读。
I am trying to build a program in C which is run in the Linux Shell, that accepts an argument (directory) and lists all the files in that directory, as well as whether they are a regular file, link file or directory. I need to use OpenDir()/ReadDir() and stat. Here is my code so far: (I'm a bit stuck) at the moment it only reads a file and outputs the type. How do I allow my program to read ALL files in a directory, and output their name AND what type of file they are?I