diff options
Diffstat (limited to '')
-rw-r--r-- | libraries/eina/src/examples/eina_file_01.c | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/libraries/eina/src/examples/eina_file_01.c b/libraries/eina/src/examples/eina_file_01.c deleted file mode 100644 index 2c945b3..0000000 --- a/libraries/eina/src/examples/eina_file_01.c +++ /dev/null | |||
@@ -1,45 +0,0 @@ | |||
1 | //Compile with: | ||
2 | //gcc -g eina_file_01.c -o eina_file_01 `pkg-config --cflags --libs eina` | ||
3 | |||
4 | #include <stdio.h> | ||
5 | #include <Eina.h> | ||
6 | |||
7 | static void | ||
8 | _print_cb(const char *name, const char *path, void *data) | ||
9 | { | ||
10 | printf("file %s in %s\n", name, path); | ||
11 | } | ||
12 | |||
13 | int | ||
14 | main(int argc, char **argv) | ||
15 | { | ||
16 | Eina_Iterator *it; | ||
17 | const char *f_name; | ||
18 | const Eina_File_Direct_Info *f_info; | ||
19 | |||
20 | eina_init(); | ||
21 | |||
22 | eina_file_dir_list("/home/", EINA_FALSE, _print_cb, NULL); | ||
23 | |||
24 | it = eina_file_ls("/home/"); | ||
25 | EINA_ITERATOR_FOREACH(it, f_name) | ||
26 | { | ||
27 | printf("%s\n", f_name); | ||
28 | eina_stringshare_del(f_name); | ||
29 | } | ||
30 | eina_iterator_free(it); | ||
31 | |||
32 | it = eina_file_stat_ls("/home/"); | ||
33 | EINA_ITERATOR_FOREACH(it, f_info) | ||
34 | printf("%s if of type %d\n", f_info->path, f_info->type); | ||
35 | eina_iterator_free(it); | ||
36 | |||
37 | it = eina_file_direct_ls("/home/"); | ||
38 | EINA_ITERATOR_FOREACH(it, f_info) | ||
39 | printf("%s if of type %d\n", f_info->path, f_info->type); | ||
40 | eina_iterator_free(it); | ||
41 | |||
42 | eina_shutdown(); | ||
43 | |||
44 | return 0; | ||
45 | } | ||