Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include "check_type.h"
- int main(int argc, char *argv[])
- {
- short i;
- for (i = 1; i < argc; i++) {
- if (is_directory(argv[1]) == S_ISDIR)
- printf("%s is a directory\n", argv[1]);
- else if (is_file(argv[1] == S_ISREG))
- printf("%s is a file\n", argv[1]);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement