Nilorea Library
C utilities for networking, threading, graphics
FILES: files utilies

Data Structures

struct  N_FILE_INFO
 common file information More...
 

Functions

void n_free_file_info (void *ptr)
 free a N_FILE_INFO struct More...
 
int n_scan_dir (const char *dir, LIST *result, const int recurse)
 Scan given directory and return a LIST of char. More...
 

Detailed Description


Data Structure Documentation

◆ N_FILE_INFO

struct N_FILE_INFO

common file information

Definition at line 31 of file n_files.h.

+ Collaboration diagram for N_FILE_INFO:
Data Fields
time_t filetime file creation time
time_t filetime_nsec
char * name file name

Function Documentation

◆ n_free_file_info()

void n_free_file_info ( void *  ptr)

free a N_FILE_INFO struct

Parameters
ptrthe pointer to the struct to free

Definition at line 15 of file n_files.c.

References __n_assert.

Referenced by n_scan_dir().

+ Here is the caller graph for this function:

◆ n_scan_dir()

int n_scan_dir ( const char *  dir,
LIST result,
const int  recurse 
)

Scan given directory and return a LIST of char.

Only files are listed.

Parameters
dirThe directory to scan
resultAn empty LIST ptr. Will be filled by a char list of result.
recurseTRUE or FALSE to enable / disable recursion
Returns
TRUE or FALSE

Definition at line 82 of file n_files.c.

References __n_assert, list_push_sorted(), LOG_ERR, Malloc, n_comp_file_info(), n_free_file_info(), n_log, and n_scan_dir().

Referenced by n_scan_dir().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: