*
* \param mount is the mount point where find the file is located
* \param fullname is the file location on the storage
+ * \param data user data to attach to the file
*
* \return An #msg_file_t associated to the file
*/
return simcall_file_ls(mount, path);
}
+/********************************* Storage **************************************/
+
/** \ingroup msg_storage_management
* \brief Return the free space size of a storage element
* \param the storage name (#char*)
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)
+{
+ xbt_assert((storage != NULL), "Invalid parameters (storage is NULL)");
+
+ xbt_die( "Not implemented yet");
+ return xbt_dict_new();
+ //return (simcall_host_get_properties(storage));
+}
+
+/** \ingroup msg_storage_management
+ * \brief Finds a msg_storage_t using its name.
+ * \param name the name of a storage.
+ * \return the corresponding storage
+ */
+msg_storage_t MSG_storage_get_by_name(const char *name)
+{
+ return (msg_storage_t) xbt_lib_get_elm_or_null(host_lib,name);
+}
+
+/** \ingroup msg_storage_management
+ * \brief Return a dynar containing all the storages declared at a given point of time
+ */
+xbt_dynar_t MSG_storages_as_dynar(void) {
+
+ xbt_dynar_t storages = xbt_dynar_new(sizeof(msg_host_t), NULL);
+ xbt_dynar_t hosts;
+ msg_host_t host;
+ unsigned int i;
+
+ hosts = MSG_hosts_as_dynar();
+ xbt_dynar_foreach(hosts, i, host){
+ xbt_dynar_push(storages,xbt_lib_get_level((void *)host, SURF_STORAGE_LEVEL));
+ }
+ return storages;
+}