/** \ingroup msg_file_management * \brief Unlink the file pointed by fd * * \param fd is the file descriptor (#msg_file_t) * \return 0 on success or 1 on error */ msg_error_t MSG_file_unlink(msg_file_t fd) { msg_file_priv_t file_priv = MSG_file_priv(fd); /* Find the host where the file is physically located (remote or local)*/ msg_storage_t storage_src = (msg_storage_t) xbt_lib_get_elm_or_null(storage_lib, file_priv->storageId); msg_storage_priv_t storage_priv_src = MSG_storage_priv(storage_src); msg_host_t attached_host = MSG_get_host_by_name(storage_priv_src->hostname); int res = simcall_file_unlink(file_priv->simdata->smx_file, attached_host); return res; }
void File::unlink() { sg_host_t attached = Host::current()->inferior(); // FIXME: we should check where this file is attached simcall_file_unlink(p_inferior,attached); }