Advertisement
Guest User

Untitled

a guest
Oct 13th, 2019
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. #include <stdio.h>
  2. #include "check_type.h"
  3.  
  4. int main(int argc, char *argv[])
  5. {
  6. short i;
  7.  
  8. for (i = 1; i < argc; i++) {
  9. if (is_directory(argv[1]) == S_ISDIR)
  10. printf("%s is a directory\n", argv[1]);
  11.  
  12. else if (is_file(argv[1] == S_ISREG))
  13. printf("%s is a file\n", argv[1]);
  14. }
  15.  
  16. return 0;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement