#include <gfarm/gfarm.h>
gfarm_error_t gfs_pio_recvfile( |
r_gf, | |
| r_off, | ||
| w_fd, | ||
| w_off, | ||
| len, | ||
recvp); |
GFS_File r_gf;gfarm_off_t r_off;int w_fd;gfarm_off_t w_off;gfarm_off_t len;gfarm_off_t * recvp;
Receives
len
bytes of data from
the position specified by the offset
r_off
in a Gfarm file
r_gf,
to the position specified by the offset
w_off
of a local file which is pointed by a file descriptor
w_fd.
If len is -1, this function transfers until the end of the file.
The transfered bytes will be stored to the memory pointed by
recvp
when
recvp
is not NULL.
If
len is a positive value,
and the value pointed by
recvp is less than
len,
that means the transfer reached
EOF.
GFARM_ERR_NO_ERRORThe function terminated successfully.
GFARM_ERR_OPERATION_NOT_PERMITTEDgf does not specify a regular file.
GFARM_ERR_BAD_FILE_DESCRIPTORThe file descripter specified by gf is
not a valid or is not open for reading.
GFARM_ERR_NO_FILE_SYSTEM_NODEThere is no available file system node.
GFARM_ERR_NO_MEMORYInsufficient memory was available.
An error except the above occurred. The reason is shown by gfarm_error_string(3).