aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_disk_lib.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/gnunet_disk_lib.h')
-rw-r--r--src/include/gnunet_disk_lib.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/include/gnunet_disk_lib.h b/src/include/gnunet_disk_lib.h
index 3805039fc..7dfd9ccf1 100644
--- a/src/include/gnunet_disk_lib.h
+++ b/src/include/gnunet_disk_lib.h
@@ -266,6 +266,16 @@ GNUNET_DISK_handle_invalid (const struct GNUNET_DISK_FileHandle *h);
266enum GNUNET_GenericReturnValue 266enum GNUNET_GenericReturnValue
267GNUNET_DISK_file_test (const char *fil); 267GNUNET_DISK_file_test (const char *fil);
268 268
269/**
270 * Check that fil corresponds to a filename and the file has read permissions.
271 *
272 * @param fil filename to check
273 * @return #GNUNET_YES if yes, #GNUNET_NO if file doesn't exist or
274 * has no read permissions, #GNUNET_SYSERR if something else
275 * (will print an error message in that case, too).
276 */
277enum GNUNET_GenericReturnValue
278GNUNET_DISK_file_test_read (const char *fil);
269 279
270/** 280/**
271 * Move a file out of the way (create a backup) by renaming it to "orig.NUM~" 281 * Move a file out of the way (create a backup) by renaming it to "orig.NUM~"
@@ -654,6 +664,22 @@ GNUNET_DISK_directory_scan (const char *dir_name,
654 GNUNET_FileNameCallback callback, 664 GNUNET_FileNameCallback callback,
655 void *callback_cls); 665 void *callback_cls);
656 666
667/**
668 * Find all files matching a glob pattern.
669 *
670 * Currently, the glob_pattern only supports asterisks in the last
671 * path component.
672 *
673 * @param glob_patterb the glob pattern to search for
674 * @param callback the method to call for each file
675 * @param callback_cls closure for @a callback
676 * @return the number of files found, -1 on error
677 */
678int
679GNUNET_DISK_glob (const char *glob_pattern,
680 GNUNET_FileNameCallback callback,
681 void *callback_cls);
682
657 683
658/** 684/**
659 * Create the directory structure for storing 685 * Create the directory structure for storing