/** * @author : garhve (dev@garhve.com) * @file : main * @created : Friday Nov 25, 2022 20:22:14 CST */ #include "tree.h" void printChild(const regfile * head) { regfile * scan = head->next; while (scan != NULL) { printf("%s\tlevel: %d\tname length: %u\tfile or dir: ",scan->node->text, scan->node->level, scan->node->len); if (scan->node->fod) printf("dir\n"); else printf("file\n"); scan = scan->next; } } int main() { regfile head; getfile(&head,"."); printChild(&head); empty(&head); return 0; }