blob: 143c5fa5b0dcae51af1146a8af9e4cea2e90c4b3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include "ecore_file_private.h"
int
ecore_file_monitor_init(void)
{
if (ecore_file_monitor_backend_init())
return 1;
return 0;
}
void
ecore_file_monitor_shutdown(void)
{
ecore_file_monitor_backend_shutdown();
}
ECORE_FILE_API Ecore_File_Monitor *
ecore_file_monitor_add(const char *path,
Ecore_File_Monitor_Cb func,
void *data)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(path, NULL);
EINA_SAFETY_ON_TRUE_RETURN_VAL(path[0] == '\0', NULL);
EINA_SAFETY_ON_NULL_RETURN_VAL(func, NULL);
return ecore_file_monitor_backend_add(path, func, data);
}
ECORE_FILE_API void
ecore_file_monitor_del(Ecore_File_Monitor *em)
{
if (!em) return;
EINA_SAFETY_ON_NULL_RETURN(em);
ecore_file_monitor_backend_del(em);
}
ECORE_FILE_API const char *
ecore_file_monitor_path_get(Ecore_File_Monitor *em)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(em, NULL);
return em->path;
}
|