Nilorea Library
C utilities for networking, threading, graphics
Loading...
Searching...
No Matches
n_files.h
Go to the documentation of this file.
1/*
2 * Nilorea Library
3 * Copyright (C) 2005-2026 Castagnier Mickael
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <https://www.gnu.org/licenses/>.
17 */
18
27#ifndef __N_FILES_HEADER
28#define __N_FILES_HEADER
29
30#ifdef __cplusplus
31extern "C" {
32#endif
33
39#include "nilorea/n_str.h"
40#include "nilorea/n_list.h"
41#include "nilorea/n_log.h"
42#include "dirent.h"
43
45typedef struct N_FILE_INFO {
47 char* name;
51
53int n_scan_dir(const char* dir, LIST* result, const int recurse);
55void n_free_file_info(void* ptr);
56
61#ifdef __cplusplus
62}
63#endif
64
65#endif
Structure of a generic LIST container.
Definition n_list.h:58
time_t filetime
file creation time
Definition n_files.h:49
time_t filetime_nsec
Definition n_files.h:49
char * name
file name
Definition n_files.h:47
int n_scan_dir(const char *dir, LIST *result, const int recurse)
scan a directory and store file information in the result list
Definition n_files.c:180
void n_free_file_info(void *ptr)
free a N_FILE_INFO structure
Definition n_files.c:60
common file information
Definition n_files.h:45
List structures and definitions.
Generic log system.
N_STR and string function declaration.