+int MSG_file_unlink(msg_file_t fd)
+{
+ int res = simcall_file_unlink(fd->simdata->smx_file);
+ free(fd->fullname);
+ xbt_free(fd->simdata);
+ xbt_free(fd->info);
+ xbt_free(fd);
+ 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 sg_storage_size_t)
+ */
+sg_storage_size_t MSG_file_get_size(msg_file_t fd){
+ return simcall_file_get_size(fd->simdata->smx_file);
+}
+
+/** \ingroup msg_file_management
+ * \brief Search for file
+ *
+ * \param mount is the mount point where find the file is located
+ * \param path the file regex to find
+ * \return a xbt_dict_t of file where key is the name of file and the
+ * value the msg_stat_t corresponding to the key
+ */
+xbt_dict_t MSG_file_ls(const char *mount, const char *path)
+{
+ xbt_assert(path,"You must set path");
+ int size = strlen(path);
+ if(size && path[size-1] != '/')
+ {
+ char *new_path = bprintf("%s/",path);
+ XBT_DEBUG("Change '%s' for '%s'",path,new_path);
+ xbt_dict_t dict = simcall_file_ls(mount, new_path);
+ xbt_free(new_path);
+ return dict;
+ }
+
+ return simcall_file_ls(mount, path);
+}
+
+/*
+ * Move a file to another location. Depending on the values of dest, dest, mount,
+ * and fullname, this move can be local or remote and, within a host, on the same
+ * mounted disk or between mounted disks.
+ *
+ */
+msg_error_t MSG_file_move (msg_file_t fd, msg_host_t dest, char* mount, char* fullname)
+{
+ THROW_UNIMPLEMENTED;
+ return MSG_OK;
+}
+
+/*
+ * Set the file position indicator in the msg_file_t by adding offset bytes
+ * to the position specified by whence (either SEEK_SET, SEEK_CUR, or SEEK_END).
+ */
+msg_error_t MSG_file_seek (msg_file_t fd, sg_storage_size_t offset, int whence)
+{
+ THROW_UNIMPLEMENTED;
+ return MSG_OK;
+}
+
+/*
+ * Rename the file in the contents of its associated storage.
+ */
+msg_error_t MSG_file_rename (msg_file_t fd, char* new_name)
+{
+ THROW_UNIMPLEMENTED;
+ return MSG_OK;
+}
+
+/********************************* Storage **************************************/
+
+/** @addtogroup msg_storage_management
+ * \htmlonly <!-- DOXYGEN_NAVBAR_LABEL="Storages" --> \endhtmlonly
+ * (#msg_storage_t) and the functions for managing it.
+ *
+ */
+
+msg_storage_t __MSG_storage_create(smx_storage_t storage)
+{
+ const char *name = SIMIX_storage_get_name(storage);
+ msg_storage_priv_t storage_private = xbt_new0(s_msg_storage_priv_t, 1);
+ xbt_lib_set(storage_lib,name,MSG_STORAGE_LEVEL,storage_private);
+ return xbt_lib_get_elm_or_null(storage_lib, name);
+}
+
+/*
+ * \brief Destroys a storage (internal call only)
+ */
+void __MSG_storage_destroy(msg_storage_priv_t storage) {
+
+ free(storage);
+}
+
+/** \ingroup msg_storage_management
+ *
+ * \brief Returns the name of the #msg_storage_t.
+ *
+ * This functions checks whether a storage is a valid pointer or not and return its name.
+ */
+const char *MSG_storage_get_name(msg_storage_t storage) {
+ xbt_assert((storage != NULL), "Invalid parameters");
+ return SIMIX_storage_get_name(storage);
+}
+
+/** \ingroup msg_storage_management
+ * \brief Returns the free space size of a storage element
+ * \param name the name of a storage
+ * \return the free space size of the storage element (as a sg_storage_size_t)
+ */
+sg_storage_size_t MSG_storage_get_free_size(const char* name){
+ return simcall_storage_get_free_size(name);
+}
+
+/** \ingroup msg_storage_management
+ * \brief Returns the used space size of a storage element
+ * \param name the name of a storage
+ * \return the used space size of the storage element (as a sg_storage_size_t)
+ */
+sg_storage_size_t MSG_storage_get_used_size(const char* name){
+ return simcall_storage_get_used_size(name);
+}
+
+/** \ingroup msg_storage_management
+ * \brief Returns a xbt_dict_t consisting of the list of properties assigned to this storage
+ * \param storage a storage
+ * \return a dict containing the properties
+ */
+xbt_dict_t MSG_storage_get_properties(msg_storage_t storage)