naspro
view naspro-core/include/NASPRO/core/path.h @ 173:71372f617827
Totally CMakeized, a bit of doc
| author | Stefano D'Angelo <zanga.mail@gmail.com> |
|---|---|
| date | Fri Mar 26 18:54:24 2010 +0200 (2010-03-26) |
| parents | d7568c8379c1 |
| children | 4f7243a606b1 |
line source
1 /*
2 * NASPRO - NASPRO Architecture for Sound Processing
3 * Core library
4 *
5 * Copyright (C) 2007-2009 Stefano D'Angelo <zanga.mail@gmail.com>
6 *
7 * See the COPYING file for license conditions.
8 */
10 #ifndef _NACORE_PATH_H
11 #define _NACORE_PATH_H
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
17 /*
18 * Scans the entries in each directory of the specified path.
19 *
20 * path is the path to scan (on Windows it's a semicolon-separated list of
21 * directories, on all other systems it's colon-separated)
22 * callback is the function which is called for each (non filtered) entry,
23 * where file is the full filename and basename contains the filename stripped
24 * of its directory path
25 * filter, if not NULL, is a function which filters filenames to be passed to
26 * callback, when it returns 0 the file is not passed to callback
27 */
28 void nacore_path_for_each(const char *path,
29 void (*callback)(const char *file, const char *basename, void *data),
30 char (*filter)(const char *file), void *data);
32 /*
33 * Like nacore_path_for_each(), but here the directories contained in path are
34 * intended as relative to the user's home directory.
35 */
36 void nacore_path_home_for_each(const char *dir,
37 void (*callback)(const char *file, const char *basename, void *data),
38 char (*filter)(const char *file), void *data);
40 #ifdef __cplusplus
41 }
42 #endif
44 #endif /* !_NACORE_PATH_H */
