- fixed string to address parsing
[oweals/gnunet.git] / src / include / gnunet_disk_lib.h
index 9c88a163bf38651fece825018d1a20ac1fe12b4c..d6ec0fe80e9d488878b24f817a53e153fb33fc66 100644 (file)
 #define OFF_T off_t
 #endif
 
-/**
- * Opaque handle used to access files.
- */
-struct GNUNET_DISK_FileHandle;
-
 /**
  * Handle used to manage a pipe.
  */
@@ -307,8 +302,8 @@ GNUNET_DISK_file_seek (const struct GNUNET_DISK_FileHandle *h, OFF_T offset,
 
 
 /**
- * Get the size of the file (or directory)
- * of the given file (in bytes).
+ * Get the size of the file (or directory) of the given file (in
+ * bytes).
  *
  * @param filename name of the file or directory
  * @param size set to the size of the file (or,
@@ -316,11 +311,13 @@ GNUNET_DISK_file_seek (const struct GNUNET_DISK_FileHandle *h, OFF_T offset,
  *             of all sizes of files in the directory)
  * @param includeSymLinks should symbolic links be
  *        included?
- * @return GNUNET_OK on success, GNUNET_SYSERR on error
+ * @param singleFileMode GNUNET_YES to only get size of one file
+ *        and return GNUNET_SYSERR for directories.
+ * @return GNUNET_SYSERR on error, GNUNET_OK on success
  */
 int
 GNUNET_DISK_file_size (const char *filename, uint64_t * size,
-                       int includeSymLinks);
+                       int includeSymLinks, int singleFileMode);
 
 
 /**
@@ -759,36 +756,6 @@ GNUNET_DISK_file_unmap (struct GNUNET_DISK_MapHandle *h);
 int
 GNUNET_DISK_file_sync (const struct GNUNET_DISK_FileHandle *h);
 
-/**
- * Creates a named pipe/FIFO and opens it
- * @param fn pointer to the name of the named pipe or to NULL
- * @param flags open flags
- * @param perm access permissions
- * @return pipe handle on success, NULL on error
- */
-struct GNUNET_DISK_FileHandle *
-GNUNET_DISK_npipe_create (char **fn, enum GNUNET_DISK_OpenFlags flags,
-                          enum GNUNET_DISK_AccessPermissions perm);
-
-/**
- * Opens already existing named pipe/FIFO
- *
- * @param fn name of an existing named pipe
- * @param flags open flags
- * @param perm access permissions
- * @return pipe handle on success, NULL on error
- */
-struct GNUNET_DISK_FileHandle *
-GNUNET_DISK_npipe_open (const char *fn, enum GNUNET_DISK_OpenFlags flags,
-                        enum GNUNET_DISK_AccessPermissions perm);
-
-/**
- * Closes a named pipe/FIFO
- * @param pipe named pipe
- * @return GNUNET_OK on success, GNUNET_SYSERR otherwise
- */
-int
-GNUNET_DISK_npipe_close (struct GNUNET_DISK_FileHandle *pipe);
 
 #if 0                           /* keep Emacsens' auto-indent happy */
 {