28#ifndef __N_FILES_HEADER
29#define __N_FILES_HEADER
59int n_file_read_bounded(
const char* path,
size_t max_size,
unsigned char** out,
size_t* out_len);
Structure of a generic LIST container.
time_t filetime
file creation time
int n_file_same_content(const char *a, const char *b)
Do two files hold the same bytes.
int n_file_write_atomic(const char *path, const unsigned char *data, size_t len, int mode)
durably and atomically write len bytes to path: write a "<path>.tmp" sibling created with mode from t...
int n_file_copy_verified(const char *from, const char *to, size_t *copied)
Copy a file, check the copy against the original, and only then give it its name.
int n_file_read_bounded(const char *path, size_t max_size, unsigned char **out, size_t *out_len)
read a whole file into a freshly allocated, NUL-terminated buffer, refusing a file larger than max_si...
int n_scan_dir(const char *dir, LIST *result, const int recurse)
scan a directory and store file information in the result list
void n_free_file_info(void *ptr)
free a N_FILE_INFO structure
List structures and definitions.
N_STR and string function declaration.