![]() |
Nilorea Library
C utilities for networking, threading, graphics
|
Data Structures | |
| struct | N_FILE_INFO |
| common file information More... | |
Functions | |
| void | n_free_file_info (void *ptr) |
| free a N_FILE_INFO structure | |
| int | n_scan_dir (const char *dir, LIST *result, const int recurse) |
| scan a directory and store file information in the result list | |
| struct N_FILE_INFO |
| void n_free_file_info | ( | void * | ptr | ) |
free a N_FILE_INFO structure
free a N_FILE_INFO structure
This implementation uses ONLY POSIX-style APIs:
MinGW provides these APIs on Windows, so no WinAPI (FindFirstFile...) is required.
Sorting:
Notes:
helper to free N_FILE_INFO structs
| ptr | a pointer to a N_FILE_INFO structure |
Definition at line 60 of file n_files.c.
References __n_assert, and N_FILE_INFO::name.
Referenced by n_scan_dir().
Here is the caller graph for this function:| int n_scan_dir | ( | const char * | dir, |
| LIST * | result, | ||
| const int | recurse | ||
| ) |
scan a directory and store file information in the result list
scan a directory and store file information in the result list
This function:
dir with opendir()result, keeping result sorted by n_comp_file_info (oldest -> newest).Error handling:
| dir | Directory to scan (non-NULL) |
| result | LIST to fill (non-NULL) |
| recurse | TRUE/FALSE recursion flag |
Definition at line 180 of file n_files.c.
References __n_assert, list_push_sorted(), LOG_ERR, Malloc, n_comp_file_info(), n_free_file_info(), n_log, n_path_join(), n_scan_dir(), n_set_time_from_stat(), and N_FILE_INFO::name.
Referenced by main(), and n_scan_dir().
Here is the call graph for this function:
Here is the caller graph for this function: