This section describes the file structure of MSG (msg_file_t) and the functions for managing it. It is based on POSIX functions.
More...
|
typedef struct msg_file * | msg_file_t |
| File datatype.You should consider this as an opaque object.
|
|
This section describes the file structure of MSG (msg_file_t) and the functions for managing it. It is based on POSIX functions.
(
msg_file_t) and the functions for managing it.
- See Also
- msg_file_t
Set the user data of a msg_file_t.
This functions checks whether some data has already been associated to file or not and attach data to file if it is possible.
Return the user data of a msg_file_t.
This functions checks whether file is a valid pointer or not and return the user data associated to file if it is possible.
Display information related to a file descriptor.
- Parameters
-
fd | is a the file descriptor |
sg_storage_size_t MSG_file_read |
( |
msg_file_t |
fd, |
|
|
sg_storage_size_t |
size |
|
) |
| |
Read a file.
- Parameters
-
size | of the file to read |
fd | is a the file descriptor |
- Returns
- the number of bytes successfully read
sg_storage_size_t MSG_file_write |
( |
msg_file_t |
fd, |
|
|
sg_storage_size_t |
size |
|
) |
| |
Write into a file.
- Parameters
-
size | of the file to write |
fd | is a the file descriptor |
- Returns
- the number of bytes successfully write
msg_file_t MSG_file_open |
( |
const char * |
mount, |
|
|
const char * |
fullname, |
|
|
void * |
data |
|
) |
| |
Opens the file whose name is the string pointed to by path.
- Parameters
-
mount | is the mount point where find the file is located |
fullname | is the file location on the storage |
data | user data to attach to the file |
- Returns
- An msg_file_t associated to the file
Close the file.
- Parameters
-
- Returns
- 0 on success or 1 on error
Unlink the file pointed by fd.
- Parameters
-
- Returns
- 0 on success or 1 on error
sg_storage_size_t MSG_file_get_size |
( |
msg_file_t |
fd) | |
|
Return the size of a file.
- Parameters
-
- Returns
- the size of the file (as a sg_storage_size_t)
xbt_dict_t MSG_file_ls |
( |
const char * |
mount, |
|
|
const char * |
path |
|
) |
| |
Search for file.
- Parameters
-
mount | is the mount point where find the file is located |
path | the file regex to find |
- Returns
- a xbt_dict_t of file where key is the name of file and the value the msg_stat_t corresponding to the key