fast timeout on disconnect
[oweals/gnunet.git] / src / include / gnunet_disk_lib.h
index f4ede13845f122181cef5c8a235351eccfdb0111..340c35a4e5cb8019cc0639b098f3042f230f2f4d 100644 (file)
@@ -288,12 +288,15 @@ int GNUNET_DISK_file_size (const char *filename,
  * @return GNUNET_OK on success
  */
 int GNUNET_DISK_file_get_identifiers (const char *filename,
-                                     uint32_t *dev,
+                                     uint64_t *dev,
                                      uint64_t *ino);
  
 
 /**
- * Create an (empty) temporary file on disk.
+ * 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.
  * 
  * @param t component to use for the name;
  *        does NOT contain "XXXXXX" or "/tmp/".
@@ -312,7 +315,7 @@ GNUNET_DISK_mktemp (const char *t);
  * @param fn file name to be opened
  * @param flags opening flags, a combination of GNUNET_DISK_OPEN_xxx bit flags
  * @param perm permissions for the newly created file, use
- *             GNUNET_DISK_PERM_USER_NONE if a file could not be created by this
+ *             GNUNET_DISK_PERM_NONE if a file could not be created by this
  *             call (because of flags)
  * @return IO handle on success, NULL on error
  */
@@ -340,9 +343,11 @@ int GNUNET_DISK_pipe_close (struct GNUNET_DISK_PipeHandle *p);
  *
  * @param p pipe to close end of
  * @param end which end of the pipe to close
+ * @return GNUNET_OK on success, GNUNET_SYSERR otherwise
  */
 int
-GNUNET_DISK_pipe_close_end (struct GNUNET_DISK_PipeHandle *p, enum GNUNET_DISK_PipeEnd end);
+GNUNET_DISK_pipe_close_end (struct GNUNET_DISK_PipeHandle *p, 
+                           enum GNUNET_DISK_PipeEnd end);
 
 /**
  * Close an open file.
@@ -355,6 +360,7 @@ int GNUNET_DISK_file_close (struct GNUNET_DISK_FileHandle *h);
 
 /**
  * Get the handle to a particular pipe end
+ *
  * @param p pipe
  * @param n end to access
  * @return handle for the respective end
@@ -452,7 +458,8 @@ struct GNUNET_DISK_DirectoryIterator;
  *
  * @param cls closure
  * @param di argument to pass to "GNUNET_DISK_directory_iterator_next" to
- *           get called on the next entry (or finish cleanly)
+ *           get called on the next entry (or finish cleanly);
+ *           NULL on error (will be the last call in that case)
  * @param filename complete filename (absolute path)
  * @param dirname directory name (absolute path)
  */