FileSystemIndexer
v0.1.2-beta
File System Indexer - An API to index files from your system
Loading...
Searching...
No Matches
FSI_dirUtils.h
Go to the documentation of this file.
1
#ifndef INCLUDE_CORE_FSI_DIRUTILS_H_
2
#define INCLUDE_CORE_FSI_DIRUTILS_H_
3
4
#ifdef __cplusplus
5
# define __FSI_DIRUTILS_CPP_OPEN extern "C" {
6
# define __FSI_DIRUTILS_CPP_CLOSE }
7
#else
8
# define __FSI_DIRUTILS_CPP_OPEN
9
# define __FSI_DIRUTILS_CPP_CLOSE
10
#endif
// __cplusplus
11
12
__FSI_DIRUTILS_CPP_OPEN
13
14
#include "
../FSIpredefines.h
"
15
16
#include "cvec/cvec.h"
17
18
typedef
enum
FSI_EntryType
19
{
20
FSI_FILE
,
21
FSI_DIR
,
22
FSI_SYMLINK
,
23
FSI_OTHER
24
}
FSI_EntryType
;
25
26
typedef
struct
FSI_DirData
27
{
28
void
*
impl
;
29
}
FSI_DirData
;
30
31
typedef
struct
FSI_EntryData
32
{
33
const
char
*
name
;
// Valid until next read
34
35
FSI_EntryType
type
;
36
}
FSI_EntryData
;
37
38
/**
39
* @brief Walk to every directory and file and set `vec` to a CVEC value
40
* @param vec The vector to set data to
41
* @param path Path to walk to all its sub-dirs
42
*/
43
void
fsi_walk
(CVEC *vec,
const
char
*path);
44
45
__FSI_DIRUTILS_CPP_CLOSE
46
47
#endif
// INCLUDE_CORE_FSI_DIRUTILS_H_
__FSI_DIRUTILS_CPP_CLOSE
#define __FSI_DIRUTILS_CPP_CLOSE
Definition
FSI_dirUtils.h:6
fsi_walk
void fsi_walk(CVEC *vec, const char *path)
Walk to every directory and file and set vec to a CVEC value.
Definition
FSI_dirUtils.c:12
__FSI_DIRUTILS_CPP_OPEN
#define __FSI_DIRUTILS_CPP_OPEN
Definition
FSI_dirUtils.h:5
FSI_EntryType
FSI_EntryType
Definition
FSI_dirUtils.h:19
FSI_SYMLINK
@ FSI_SYMLINK
Definition
FSI_dirUtils.h:22
FSI_DIR
@ FSI_DIR
Definition
FSI_dirUtils.h:21
FSI_OTHER
@ FSI_OTHER
Definition
FSI_dirUtils.h:23
FSI_FILE
@ FSI_FILE
Definition
FSI_dirUtils.h:20
FSIpredefines.h
FSI_DirData
Definition
FSI_dirUtils.h:27
FSI_DirData::impl
void * impl
Definition
FSI_dirUtils.h:28
FSI_EntryData
Definition
FSI_dirUtils.h:32
FSI_EntryData::type
FSI_EntryType type
Definition
FSI_dirUtils.h:35
FSI_EntryData::name
const char * name
Definition
FSI_dirUtils.h:33
inc
fsi
core
FSI_dirUtils.h
Generated by
1.16.1