-peer review
[oweals/gnunet.git] / src / include / gnunet_disk_lib.h
index fdd9e8d774d368715b1b3db5a27b00ceb53cf55b..c0a68bb67c5760e9439a87341dc6cabf9a46d5a1 100644 (file)
  */
 struct GNUNET_DISK_PipeHandle;
 
-
+/**
+ * Type of a handle.
+ */
 enum GNUNET_FILE_Type
 {
-  GNUNET_DISK_FILE, GNUNET_PIPE
+  /**
+   * Handle represents a file.
+   */ 
+  GNUNET_DISK_HANLDE_TYPE_FILE, 
+
+  /**
+   * Handle represents a pipe.
+   */
+  GNUNET_DISK_HANLDE_TYPE_PIPE
 };
 
 /**
@@ -356,15 +366,13 @@ GNUNET_DISK_mktemp (const char *t);
 
 
 /**
- * Create an (empty) temporary file on disk.  If the given name is not
- * an absolute path, the current 'TMPDIR' will be prepended.  In any case,
- * 6 random characters will be appended to the name to create a unique
- * filename.
+ * Create an (empty) temporary directory on disk.  If the given name is not an
+ * absolute path, the current 'TMPDIR' will be prepended.  In any case, 6
+ * random characters will be appended to the name to create a unique name.
  *
  * @param t component to use for the name;
  *        does NOT contain "XXXXXX" or "/tmp/".
- * @return NULL on error, otherwise name of fresh
- *         file on disk in directory for temporary files
+ * @return NULL on error, otherwise name of freshly created directory
  */
 char *
 GNUNET_DISK_mkdtemp (const char *t);
@@ -474,11 +482,10 @@ GNUNET_DISK_pipe_handle (const struct GNUNET_DISK_PipeHandle *p,
  * @param fd native file descriptor
  * @return file handle corresponding to the descriptor
  */
-const struct GNUNET_DISK_FileHandle *
+struct GNUNET_DISK_FileHandle *
 GNUNET_DISK_get_handle_from_native (FILE *fd);
 
 
-
 /**
  * Read the contents of a binary file into a buffer.
  * @param h handle to an open file
@@ -672,11 +679,11 @@ GNUNET_DISK_directory_test (const char *fil);
  * Remove all files in a directory (rm -rf). Call with
  * caution.
  *
- * @param fileName the file to remove
+ * @param filename the file to remove
  * @return GNUNET_OK on success, GNUNET_SYSERR on error
  */
 int
-GNUNET_DISK_directory_remove (const char *fileName);
+GNUNET_DISK_directory_remove (const char *filename);
 
 
 /**