Closed Giromi closed 2 years ago
*/이 들어오면 내부 dir_flag켜주고 이름만 들어가야 함
int main(int ac, char *av[])
{
t_file *files;
int cnt;
files = get_files_cur_pwd("/Users/minsuki2/Desktop/Minishell/lexer/test_dir", 1);
printf("\n");
printf("\n");
for (int i = 0; i < files->n; i++)
{
if (i == 0)
printf("files_n\t:\t%d\n", files[i].n);
printf("name\t:\t%s\n", files[i].name);
printf("mflag\t:\t%d\n", files[i].match_flag);
printf("type\t:\t%d\n", files[i].type);
printf("\n");
}
cnt = is_matching_file("test*/", files);
printf("------------------------------------\nmatching cnt : %d\n\n", cnt);
for (int i = 0; i < files->n; i++)
{
if (i == 0)
printf("files_n\t:\t%d\n", files[i].n);
printf("name\t:\t%s\n", files[i].name);
printf("mflag\t:\t%d\n", files[i].match_flag);
printf("type\t:\t%d\n", files[i].type);
printf("\n");
}
// system("leaks -q a.out");
return (0);
}
Before (*.c)
After (*.c)