diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-03-19 10:48:51 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-03-19 10:48:51 +0000 |
commit | b3e1d0806fb274c62a5acf19c56369b71f992312 (patch) | |
tree | 657a7cd7a327aad0e7598b3d28cecc0d5cd95cd4 /src/include/gnunet_disk_lib.h | |
parent | 0385dc1043912d3ddc5d57f6b7346054a30f64ef (diff) | |
download | gnunet-b3e1d0806fb274c62a5acf19c56369b71f992312.tar.gz gnunet-b3e1d0806fb274c62a5acf19c56369b71f992312.zip |
-LRN: calculate file size for single files when needed and use GNUNET_DISK_file_size instead of STAT
Diffstat (limited to 'src/include/gnunet_disk_lib.h')
-rw-r--r-- | src/include/gnunet_disk_lib.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/include/gnunet_disk_lib.h b/src/include/gnunet_disk_lib.h index 18f553576..d6ec0fe80 100644 --- a/src/include/gnunet_disk_lib.h +++ b/src/include/gnunet_disk_lib.h | |||
@@ -302,8 +302,8 @@ GNUNET_DISK_file_seek (const struct GNUNET_DISK_FileHandle *h, OFF_T offset, | |||
302 | 302 | ||
303 | 303 | ||
304 | /** | 304 | /** |
305 | * Get the size of the file (or directory) | 305 | * Get the size of the file (or directory) of the given file (in |
306 | * of the given file (in bytes). | 306 | * bytes). |
307 | * | 307 | * |
308 | * @param filename name of the file or directory | 308 | * @param filename name of the file or directory |
309 | * @param size set to the size of the file (or, | 309 | * @param size set to the size of the file (or, |
@@ -311,11 +311,13 @@ GNUNET_DISK_file_seek (const struct GNUNET_DISK_FileHandle *h, OFF_T offset, | |||
311 | * of all sizes of files in the directory) | 311 | * of all sizes of files in the directory) |
312 | * @param includeSymLinks should symbolic links be | 312 | * @param includeSymLinks should symbolic links be |
313 | * included? | 313 | * included? |
314 | * @return GNUNET_OK on success, GNUNET_SYSERR on error | 314 | * @param singleFileMode GNUNET_YES to only get size of one file |
315 | * and return GNUNET_SYSERR for directories. | ||
316 | * @return GNUNET_SYSERR on error, GNUNET_OK on success | ||
315 | */ | 317 | */ |
316 | int | 318 | int |
317 | GNUNET_DISK_file_size (const char *filename, uint64_t * size, | 319 | GNUNET_DISK_file_size (const char *filename, uint64_t * size, |
318 | int includeSymLinks); | 320 | int includeSymLinks, int singleFileMode); |
319 | 321 | ||
320 | 322 | ||
321 | /** | 323 | /** |