Added some small boring scripts and programs writen in few last years
[mirrors/Programs.git] / bash / bbs / utils / fm / fm-1.0 / ino.c
1 #include <sys/inotify>
2
3 GHashTable *directory_paths;
4
5 void 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
11 void 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
25 GNode *get_file_by_path(char *path)
26 {
27 }
28
29 void insert_file_in_directory(GNode *directory, GNode *file)
30 {
31 }
32
33 void remove_file_from_directory(GNode *file)
34 {
35 }
This page took 0.270364 seconds and 4 git commands to generate.