22 lines
354 B
C
22 lines
354 B
C
/*
|
|
* SPDX-License-Identifier: MIT
|
|
* Copyright (c) 2025 Fabio Scotto di Santolo
|
|
*/
|
|
|
|
|
|
#include "tree.h"
|
|
#include <stdio.h>
|
|
#include <stdlib.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;
|
|
}
|