gfs_pio_sendfile(3)

gfs_pio_sendfile3

Receive a gfarm file to local machine

Usage

#include <gfarm/gfarm.h>

gfarm_error_t gfs_pio_sendfile(GFS_File w_gf, gfarm_off_t w_off, int r_fd, gfarm_off_t r_off, gfarm_off_t len, gfarm_off_t * sentp);

Overview

Sends len bytes of data from the position specified by the offset r_off in a local file which is pointed by a file descriptor r_fd, to the position specified by the offset w_off of a Gfarm file w_gf. If len is -1, this function transfers until the end of the file. The transfered bytes will be stored to the memory pointed by sentp when sentp is not NULL. If len is a positive value, and the value pointed by sentp is less than len, that means the transfer reached EOF.

Return values

GFARM_ERR_NO_ERROR

The function terminated successfully.

GFARM_ERR_OPERATION_NOT_PERMITTED

gf does not specify a regular file.

GFARM_ERR_BAD_FILE_DESCRIPTOR

The file descripter specified by gf is not a valid or is not open for reading.

GFARM_ERR_NO_FILE_SYSTEM_NODE

There is no available file system node.

GFARM_ERR_NO_MEMORY

Insufficient memory was available.

Others

An error except the above occurred. The reason is shown by gfarm_error_string(3).

Releases

5 releases since Debian 9 (Stretch); the text changed 1 time.

  1. 9–10
  2. 11–13

From libgfarm-dev 2.7.20+dfsg-1.2+b1 in Debian 13 (Trixie). Parsed by carta from the page's man source.