docs
[mirrors/Programs.git] / bash / bbs / utils / fm / fm-1.0 / ino.c
CommitLineData
21c4e167
H
1#include <sys/inotify>
2
3GHashTable *directory_paths;
4
5void init_directory_paths(void)
6{
7 // FIXME padding '////' from root_path
8 directory_paths = g_hash_table_new(g_str_hash, g_str_equal);
9}
10
11void init_inotify(char *root_path)
12{
13 int descriptor, watch;
14
15 if ((descriptor = inotify_init()) == -1) {
16 PRINT_ERRNO_INFO();
17 return;
18 }
19 if ((watch = inotify_add_watch(descriptor, root_path, IN_MOVED_FROM | IN_MOVED_TO | IN_DELETED)) == -1) {
20 PRINT_ERRNO_INFO();
21 return;
22 }
23}
24
25GNode *get_file_by_path(char *path)
26{
27}
28
29void insert_file_in_directory(GNode *directory, GNode *file)
30{
31}
32
33void remove_file_from_directory(GNode *file)
34{
35}
This page took 0.190093 seconds and 4 git commands to generate.