Advertisement
STANAANDREY

pb3 ppsp

Oct 27th, 2024 (edited)
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.63 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <sys/types.h>
  4. #include <dirent.h>
  5. #include <fcntl.h>           /* Definition of AT_* constants */
  6. #include <sys/stat.h>
  7.  
  8.  
  9. void traverseDir(const char dirpath[]) {
  10.     DIR *dir = opendir(dirpath);
  11.     if (dir == NULL) {
  12.         perror("opendir");
  13.         exit(-1);
  14.     }
  15.     for (struct dirent *dep; (dep = readdir(dir));) {
  16.        
  17.     }
  18.     if (closedir(dir)) {
  19.         perror("");
  20.     }
  21. }
  22.  
  23. int main(int argc, char *argv[]) {
  24.     if (argc != 5) {
  25.         fprintf(stderr, "Usage: %s <directory> <letter> <number> <output_file_path>\n", argv[0]);
  26.         exit(-1);
  27.     }
  28.  
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement