diff options
Diffstat (limited to 'apps/plugins/shortcuts/shortcuts_common.c')
-rw-r--r-- | apps/plugins/shortcuts/shortcuts_common.c | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/apps/plugins/shortcuts/shortcuts_common.c b/apps/plugins/shortcuts/shortcuts_common.c index 4a097f0a0d..91e3084e10 100644 --- a/apps/plugins/shortcuts/shortcuts_common.c +++ b/apps/plugins/shortcuts/shortcuts_common.c | |||
@@ -360,35 +360,3 @@ void write_entry_to_file(int fd, sc_entry_t *entry) | |||
360 | } | 360 | } |
361 | rb->fdprintf(fd, "\n"); | 361 | rb->fdprintf(fd, "\n"); |
362 | } | 362 | } |
363 | |||
364 | |||
365 | bool file_exists(char *filename) | ||
366 | { | ||
367 | int fd = rb->open(filename, O_RDONLY); | ||
368 | bool retval; | ||
369 | if (fd >= 0) { | ||
370 | rb->close(fd); | ||
371 | retval = true; | ||
372 | } else { | ||
373 | retval = false; | ||
374 | } | ||
375 | DEBUGF("Checked existence of the file '%s': %s\n", | ||
376 | filename, (retval ? "found" : "NOT FOUND")); | ||
377 | return retval; | ||
378 | } | ||
379 | |||
380 | |||
381 | bool dir_exists(char *path) | ||
382 | { | ||
383 | DIR* d = rb->opendir(path); | ||
384 | bool retval; | ||
385 | if (d != NULL) { | ||
386 | rb->closedir(d); | ||
387 | retval = true; | ||
388 | } else { | ||
389 | retval = false; | ||
390 | } | ||
391 | DEBUGF("Checked existence of the dir '%s': %s\n", | ||
392 | path, (retval ? "found" : "NOT FOUND")); | ||
393 | return retval; | ||
394 | } | ||