summaryrefslogtreecommitdiff
path: root/src/dir/dir.h
blob: 8dd0b0e68f7be50b4160664e96e8a1cc81e69320 (plain) (blame)
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
35
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 {
	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);

str get_file_format(str filename);

uint64_t getNEntries(const char *dir);

char **getFiles(const char *dir);

#endif