File Crawler to list all files in hardisk (for Linux)

Hello i want to create a file crawler that lists all files in hard disk using directory functions in C i have been able to list files in one directory only and haven't been able to crawl through other directories and sub-directories this is what i have so far.

Ignore the vector part and concentrate on how it recognizes a new sub directory and makes a recursive call to process the files in it. In C language I would replace that vector with a linked list if you need to keep the list of all files in memory for some reason.