Created
December 13, 2017 17:41
-
-
Save tarcisio-marinho/8b6519ecd7d7c97b105e9a905efc8090 to your computer and use it in GitHub Desktop.
find files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* If finds a file, append to the linked list */ | |
if(ent->d_type == 8){ // it's a file | |
while(ext != NULL){ // check file extension | |
if(strcmp(get_filename_ext(path_to_file), ext) == 0){ | |
append(files, path_to_file, NULL, NULL); | |
break; | |
} | |
ext = strtok(NULL, " "); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment