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
31
extern
"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
45
typedef
struct
N_FILE_INFO
{
47
char
*
name
;
49
time_t
filetime
,
filetime_nsec
;
50
}
N_FILE_INFO
;
51
53
int
n_scan_dir
(
const
char
* dir,
LIST
* result,
const
int
recurse);
55
void
n_free_file_info
(
void
* ptr);
56
61
#ifdef __cplusplus
62
}
63
#endif
64
65
#endif
LIST
Structure of a generic LIST container.
Definition
n_list.h:58
N_FILE_INFO::filetime
time_t filetime
file creation time
Definition
n_files.h:49
N_FILE_INFO::filetime_nsec
time_t filetime_nsec
Definition
n_files.h:49
N_FILE_INFO::name
char * name
file name
Definition
n_files.h:47
n_scan_dir
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
n_free_file_info
void n_free_file_info(void *ptr)
free a N_FILE_INFO structure
Definition
n_files.c:60
N_FILE_INFO
common file information
Definition
n_files.h:45
n_list.h
List structures and definitions.
n_log.h
Generic log system.
n_str.h
N_STR and string function declaration.
include
nilorea
n_files.h
Generated on Wed Apr 1 2026 20:44:56 for Nilorea Library by
1.9.8