XBT_PUBLIC(size_t) MSG_file_write(const void* ptr, size_t size, size_t nmemb, msg_file_t stream);
XBT_PUBLIC(msg_file_t) MSG_file_open(const char* mount, const char* path, const char* mode);
XBT_PUBLIC(int) MSG_file_close(msg_file_t fp);
+XBT_PUBLIC(size_t) MSG_file_get_size(msg_file_t fd);
XBT_PUBLIC(int) MSG_file_unlink(msg_file_t fd);
XBT_PUBLIC(xbt_dict_t) MSG_file_ls(const char *mount, const char *path);
return res;
}
+/** \ingroup msg_file_management
+ * \brief Return the size of a file
+ *
+ * \param fd is the file descriptor (#msg_file_t)
+ * \return the size of the file (as a size_t)
+ */
+
+size_t MSG_file_get_size(msg_file_t fd){
+ return fd->simdata->smx_file->surf_file->size;
+}
+
/** \ingroup msg_file_management
* \brief Search for file
*