Files
system-programming/exercises/tree/main.c
2025-07-01 10:21:34 +02:00

16 lines
292 B
C

#include <stdio.h>
#include <stdlib.h>
#include "tree.h"
int main(int argc, char *argv[]) {
const char *path = (argc > 1) ? argv[1] : ".";
if (print_tree(path, 0) == -1) {
perror("Error traversing directory");
return EXIT_FAILURE;
}
return EXIT_SUCCESS;
}