refactor(tree,utilities)!: moved find_root and walk to the utilities and removed the Tree struct in favor or the FileInfoBuffer
This commit is contained in:
parent
8efadf051c
commit
326a33a3f4
4 changed files with 149 additions and 157 deletions
|
|
@ -15,22 +15,12 @@
|
|||
#include "file.h"
|
||||
|
||||
typedef List PathBuffer;
|
||||
typedef List Tree;
|
||||
typedef List FileInfoBuffer;
|
||||
|
||||
typedef struct {
|
||||
char* dir;
|
||||
FileInfoBuffer* files;
|
||||
size_t len;
|
||||
size_t capacity;
|
||||
} TreeEntry;
|
||||
|
||||
PathBuffer* path_buffer_new();
|
||||
void path_buffer_push(PathBuffer*, char*);
|
||||
void path_buffer_sort(PathBuffer*);
|
||||
void path_buffer_free(PathBuffer*);
|
||||
char* find_root(char*);
|
||||
void walk(char*, char*, char*, PathBuffer*, int, char*);
|
||||
void save_tree(PathBuffer*);
|
||||
|
||||
#endif // TREE_H
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue