SimGrid  3.13
Versatile Simulation of Distributed Systems
msg_io.cpp File Reference
#include "msg_private.h"
#include "xbt/log.h"

Functions

 XBT_LOG_NEW_DEFAULT_SUBCATEGORY (msg_io, msg,"Logging specific to MSG (io)")
 
void __MSG_file_get_info (msg_file_t fd)
 
msg_error_t MSG_file_set_data (msg_file_t fd, void *data)
 Set the user data of a msg_file_t. More...
 
voidMSG_file_get_data (msg_file_t fd)
 Return the user data of a msg_file_t. More...
 
void MSG_file_dump (msg_file_t fd)
 Display information related to a file descriptor. More...
 
sg_size_t MSG_file_read (msg_file_t fd, sg_size_t size)
 Read a file (local or remote) More...
 
sg_size_t MSG_file_write (msg_file_t fd, sg_size_t size)
 Write into a file (local or remote) More...
 
msg_file_t MSG_file_open (const char *fullpath, void *data)
 Opens the file whose name is the string pointed to by path. More...
 
int MSG_file_close (msg_file_t fd)
 Close the file. More...
 
msg_error_t MSG_file_unlink (msg_file_t fd)
 Unlink the file pointed by fd. More...
 
sg_size_t MSG_file_get_size (msg_file_t fd)
 Return the size of a file. More...
 
msg_error_t MSG_file_seek (msg_file_t fd, sg_offset_t offset, int origin)
 Set the file position indicator in the msg_file_t by adding offset bytes to the position specified by origin (either SEEK_SET, SEEK_CUR, or SEEK_END). More...
 
sg_size_t MSG_file_tell (msg_file_t fd)
 Returns the current value of the position indicator of the file. More...
 
const char * MSG_file_get_name (msg_file_t fd)
 
msg_error_t MSG_file_move (msg_file_t fd, const char *fullpath)
 Move a file to another location on the same mount point. More...
 
msg_error_t MSG_file_rcopy (msg_file_t file, msg_host_t host, const char *fullpath)
 Copy a file to another location on a remote host. More...
 
msg_error_t MSG_file_rmove (msg_file_t file, msg_host_t host, const char *fullpath)
 Move a file to another location on a remote host. More...
 
void __MSG_file_destroy (msg_file_priv_t file)
 Destroys a file (internal call only) More...
 
msg_storage_t __MSG_storage_create (smx_storage_t storage)
 
void __MSG_storage_destroy (msg_storage_priv_t storage)
 Destroys a storage (internal call only) More...
 
const char * MSG_storage_get_name (msg_storage_t storage)
 Returns the name of the msg_storage_t. More...
 
sg_size_t MSG_storage_get_free_size (msg_storage_t storage)
 Returns the free space size of a storage element. More...
 
sg_size_t MSG_storage_get_used_size (msg_storage_t storage)
 Returns the used space size of a storage element. More...
 
xbt_dict_t MSG_storage_get_properties (msg_storage_t storage)
 Returns a xbt_dict_t consisting of the list of properties assigned to this storage. More...
 
void MSG_storage_set_property_value (msg_storage_t storage, const char *name, char *value, void_f_pvoid_t free_ctn)
 Change the value of a given storage property. More...
 
const char * MSG_storage_get_property_value (msg_storage_t storage, const char *name)
 Returns the value of a given storage property. More...
 
msg_storage_t MSG_storage_get_by_name (const char *name)
 Finds a msg_storage_t using its name. More...
 
xbt_dynar_t MSG_storages_as_dynar (void)
 Returns a dynar containing all the storage elements declared at a given point of time. More...
 
msg_error_t MSG_storage_set_data (msg_storage_t storage, void *data)
 Set the user data of a msg_storage_t. More...
 
voidMSG_storage_get_data (msg_storage_t storage)
 Returns the user data of a msg_storage_t. More...
 
xbt_dict_t MSG_storage_get_content (msg_storage_t storage)
 Returns the content (file list) of a msg_storage_t. More...
 
sg_size_t MSG_storage_get_size (msg_storage_t storage)
 Returns the size of a msg_storage_t. More...
 
const char * MSG_storage_get_host (msg_storage_t storage)
 Returns the host name the storage is attached to. More...
 

Function Documentation

XBT_LOG_NEW_DEFAULT_SUBCATEGORY ( msg_io  ,
msg  ,
"Logging specific to MSG (io)"   
)
void __MSG_file_get_info ( msg_file_t  fd)
const char* MSG_file_get_name ( msg_file_t  fd)
void __MSG_file_destroy ( msg_file_priv_t  file)

Destroys a file (internal call only)

msg_storage_t __MSG_storage_create ( smx_storage_t  storage)
void __MSG_storage_destroy ( msg_storage_priv_t  storage)

Destroys a storage (internal call only)

const char* MSG_storage_get_property_value ( msg_storage_t  storage,
const char *  name 
)

Returns the value of a given storage property.

Parameters
storagea storage
namea property name
Returns
value of a property (or NULL if property not set)