Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <sys/types.h>
- #include <dirent.h>
- #include <fcntl.h> /* Definition of AT_* constants */
- #include <sys/stat.h>
- void traverseDir(const char dirpath[]) {
- DIR *dir = opendir(dirpath);
- if (dir == NULL) {
- perror("opendir");
- exit(-1);
- }
- for (struct dirent *dep; (dep = readdir(dir));) {
- }
- if (closedir(dir)) {
- perror("");
- }
- }
- int main(int argc, char *argv[]) {
- if (argc != 5) {
- fprintf(stderr, "Usage: %s <directory> <letter> <number> <output_file_path>\n", argv[0]);
- exit(-1);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement