- XBT_INFO("*** Renaming '/tmp/data.txt' into '/tmp/simgrid.readme'");
- MSG_storage_file_rename(storage, "/tmp/data.txt", "/tmp/simgrid.readme");
+ XBT_INFO("*** Move '/tmp/data.txt' into '/tmp/simgrid.readme'");
+ MSG_file_move(file, "/home/tmp/simgrid.readme");
+
+ // Attach some user data to the file
+ MSG_file_set_data(file, xbt_strdup("777"));
+ // Retrieve these data
+ char *data = MSG_file_get_data(file);
+ XBT_INFO("User data attached to the file: %s", data);
+
+ MSG_file_close(file);
+ free(file_name);