diff options
Diffstat (limited to 'src/dir/dir.h')
| -rwxr-xr-x | src/dir/dir.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/dir/dir.h b/src/dir/dir.h new file mode 100755 index 0000000..75ec02c --- /dev/null +++ b/src/dir/dir.h @@ -0,0 +1,36 @@ +#ifndef DIR_H +#define DIR_H + +#ifndef _LARGEFILE_SOURCE +#define _LARGEFILE_SOURCE +#endif + +#include <stdio.h> +#include <stdlib.h> +#include <stdbool.h> +#include <string.h> +#include <inttypes.h> +#include <dirent.h> +#include <sys/stat.h> +#include "str/str.h" + + +struct file { + struct str name; + bool temp; +}; + + +uint64_t get_fd_size(int fd); + +uint64_t get_fp_size(FILE *fp); + +uint64_t get_file_size(char *filename); + +struct str get_file_format(struct str filename); + +uint64_t getNEntries(const char *dir); + +char **getFiles(const char *dir); + +#endif |
