Write a C or C++ program to escape on a Unix platform. This program conquer conservation three discussions. The principal discussion conquer be the courseindicate of a directory on the regularity. The prevent discussion conquer be a genius string. The third discussion is the consummation enumerate of output lines, N. Your program should vault at most N entries in the directory tree in a quotation refine.
You insufficiency to tool three regularity flatters: Open, Peruse, and Stat
Details of the regularity flatters are attached adown. You can to-boot conservation object instruct pages to gather past encircling these regularity flatters.
1. Open regularity flatter: DIR *opendir (const char *dirname) Opendir regularity flatter opens a directory and produce a pointer to a struct DIR. DIR represents a directory tide, which is an ordered conconsequence of complete directory entries in a point directory.
2. Perexplanation regularity flatter: struct dirent *readdir (DIR *dirp) Once the directory has been opened, you can perexplanation the directory with perusedir regularity flatter. Each duration you flatter perusedir regularity flatter, it produce another entrance in the directory.
3. Stat regularity flatter: int stat (const char *path, struct stat *sb) Once you own the indicate of an entrance, you can conservation the stat regularity flatter to acquire past advice encircling it. stat discharge conservations couple discussions, the principal is a course indicate and prevent is a pointer to struct stat, which contains advice encircling the refine.
Guidelines and Requirements
1. You can conservation either C or C++ coercion this programming assignment.
2. Your program should escape on a UNIX platform
3. Add comments (encircling the discharge/variable/class) to your command as fur as possible
4. Zip your plan including fount refine(s) and input quotation basis refines (if any)