/*
This file is part of GNUnet.
- (C) 2001-2012 Christian Grothoff (and other contributing authors)
+ Copyright (C) 2001-2012 Christian Grothoff (and other contributing authors)
GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
*/
enum GNUNET_FILE_Type
{
+ /**
+ * Handle represents an event.
+ */
+ GNUNET_DISK_HANLDE_TYPE_EVENT,
+
/**
* Handle represents a file.
*/
* Checks whether a handle is invalid
*
* @param h handle to check
- * @return GNUNET_YES if invalid, GNUNET_NO if valid
+ * @return #GNUNET_YES if invalid, #GNUNET_NO if valid
*/
int
GNUNET_DISK_handle_invalid (const struct GNUNET_DISK_FileHandle *h);
GNUNET_DISK_get_handle_from_w32_handle (HANDLE osfh);
#endif
+/**
+ * Update POSIX permissions mask of a file on disk. If both argumets
+ * are #GNUNET_NO, the file is made world-read-write-executable (777).
+ * Does nothing on W32.
+ *
+ * @param fn name of the file to update
+ * @param require_uid_match #GNUNET_YES means 700
+ * @param require_gid_match #GNUNET_YES means 770 unless @a require_uid_match is set
+ */
+void
+GNUNET_DISK_fix_permissions (const char *fn,
+ int require_uid_match,
+ int require_gid_match);
+
+
/**
* Get a handle from a native integer FD.