-int mf_read(MFile mf, zint no, int offset, int nbytes, void *buf);
-
-/*
- * Same.
- */
-int mf_write(MFile mf, zint no, int offset, int nbytes, const void *buf);
-
-/*
- * Destroy a metafile, unlinking component files. File must be open.
- */
-int mf_unlink(MFile mf);
-
-
-/*
- * Destroy all metafiles. No files may be opened.
- */
-void mf_reset(MFile_area ma);
+int mf_read(MFile mf, zint no, int offset, int nbytes, void *buf)
+ ZEBRA_GCC_ATTR((warn_unused_result));
+
+/** \brief writes block to metafile
+ \param mf metafile handle
+ \param no block position
+ \param offset offset within block
+ \param nbytes no of bytes to write (0 for whole block)
+ \param buf content to be written
+ \retval 0 block written
+ \retval -1 error (block not written)
+*/
+int mf_write(MFile mf, zint no, int offset, int nbytes, const void *buf)
+ ZEBRA_GCC_ATTR((warn_unused_result));
+
+/** \brief reset all files in a metafile area (optionally delete them as well)
+ \param ma metafile area
+ \param unlink_flag if unlink_flag=1 all files are removed from FS
+*/
+void mf_reset(MFile_area ma, int unlink_flag);
+
+/* \brief gets statistics about directory in metafile area
+ \param ma the area
+ \param no directory number (0=first, 1=second,...)
+ \param directory holds directory name (if found)
+ \param used_bytes used file bytes in directory (if found)
+ \param max_bytes max usage of bytes (if found)
+ \retval 1 no is within range and directory, used, max are set.
+ \retval 0 no is out of range and directory, used, max are unset
+
+ We are using double, because off_t may have a different size
+ on same platform depending on whether 64-bit is enabled or not.
+ Note that if an area has unlimited size, that is represented
+ as max_bytes = -1.
+*/
+int mf_area_directory_stat(MFile_area ma, int no, const char **directory,
+ double *bytes_used, double *bytes_max);
+
+YAZ_END_CDECL