diff options
author | Sree Harsha Totakura <totakura@in.tum.de> | 2012-11-07 16:56:55 +0000 |
---|---|---|
committer | Sree Harsha Totakura <totakura@in.tum.de> | 2012-11-07 16:56:55 +0000 |
commit | fc8e308ea06aff671dc1d21e99e8b42bf5c2fda1 (patch) | |
tree | d85027a39b401f7e1cd766a3f8d9f992393d0517 /src/include/gnunet_disk_lib.h | |
parent | ad47a1f332a5aa12d7b56e2b552fcdad65a90bbf (diff) | |
download | gnunet-fc8e308ea06aff671dc1d21e99e8b42bf5c2fda1.tar.gz gnunet-fc8e308ea06aff671dc1d21e99e8b42bf5c2fda1.zip |
Parameterized directory listing permission check
Diffstat (limited to 'src/include/gnunet_disk_lib.h')
-rw-r--r-- | src/include/gnunet_disk_lib.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/include/gnunet_disk_lib.h b/src/include/gnunet_disk_lib.h index 91cc1587a..73736be31 100644 --- a/src/include/gnunet_disk_lib.h +++ b/src/include/gnunet_disk_lib.h | |||
@@ -663,17 +663,18 @@ GNUNET_DISK_directory_create_for_file (const char *filename); | |||
663 | 663 | ||
664 | 664 | ||
665 | /** | 665 | /** |
666 | * Test if "fil" is a directory that can be accessed. | 666 | * Test if "fil" is a directory and readable. Also check if the directory is |
667 | * Will not print an error message if the directory | 667 | * listable. Will not print an error message if the directory does not exist. |
668 | * does not exist. Will log errors if GNUNET_SYSERR is | 668 | * Will log errors if GNUNET_SYSERR is returned (i.e., a file exists with the |
669 | * returned. | 669 | * same name). |
670 | * | 670 | * |
671 | * @param fil filename to test | 671 | * @param fil filename to test |
672 | * @return GNUNET_YES if yes, GNUNET_NO if does not exist, GNUNET_SYSERR | 672 | * @param is_listable GNUNET_YES to additionally check if "fil" is listable |
673 | * on any error and if exists but not directory | 673 | * @return GNUNET_YES if yes, GNUNET_NO if not, GNUNET_SYSERR if it |
674 | * does not exist | ||
674 | */ | 675 | */ |
675 | int | 676 | int |
676 | GNUNET_DISK_directory_test (const char *fil); | 677 | GNUNET_DISK_directory_test (const char *fil, int is_listable); |
677 | 678 | ||
678 | 679 | ||
679 | /** | 680 | /** |