-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdir.h
More file actions
34 lines (26 loc) · 630 Bytes
/
dir.h
File metadata and controls
34 lines (26 loc) · 630 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#ifndef DIR_H
#define DIR_H
#include <dirent.h>
#include <stdbool.h>
typedef struct {
char **f_names;
size_t count;
} filenames_t;
typedef struct {
char **direntries;
size_t count;
} dirlistnames_t;
typedef struct {
int total;
int files;
int dir;
} dirlistcount_t;
dirlistnames_t * getDirEntries(char *);
filenames_t * getFilenames(char *);
dirlistcount_t * countOfListing(char *);
filenames_t * addFilenames(filenames_t *, char *);
bool isdir(struct dirent *);
bool isSymbolicDirStructure(char *name);
void printFilenames(const filenames_t *filenames);
bool freeEntries(filenames_t *);
#endif