GFS_PIO_RECVFILE(3)

πŸ’– GFS_PIO_RECVFILE(3) πŸ’–

okay so bestie, welcome to the Gfarm manual, section 3 (that's the library functions girlies). this one is gfs_pio_recvfile, and it's literally about yoinking bytes out of a Gfarm file and dropping them onto your local machine. no cap. πŸ¦‹


✨ NAME ✨

gfs_pio_recvfile β€” receive a Gfarm file to local machine


🌸 SYNOPSIS 🌸

#include <gfarm/gfarm.h>

gfarm_error_t gfs_pio_recvfile(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);

πŸ‘‘ DESCRIPTION πŸ‘‘

so here's the tea, bestie. gfs_pio_recvfile receives len bytes of data, and it takes them from the position specified by the offset r_off inside a Gfarm file called r_gf, and it puts them at the position specified by the offset w_off of a local file β€” that local file being the one pointed to by the file descriptor w_fd. πŸ’…

and if len is -1?? oh she's going all the way, transferring until the end of the file. periodt.

the transferred bytes get stored into the memory pointed to by recvp, but only when recvp is not NULL (so if you pass NULL, she just… doesn't tell you how much she moved. her business. πŸ™ˆ).

now this next bit is important, don't skip it: if len is a positive value, and the value pointed to by recvp is less than len, that means the transfer reached EOF. that's the signal, that's the vibe check. πŸ’€


⭐ RETURN VALUES ⭐

  • GFARM_ERR_NO_ERROR β€” the function terminated successfully. she ate, no crumbs. πŸ”₯
  • GFARM_ERR_OPERATION_NOT_PERMITTED β€” gf does not specify a regular file. not a regular file?? not her type, sorry. πŸŽ€
  • GFARM_ERR_BAD_FILE_DESCRIPTOR β€” the file descripter specified by gf is not a valid or is not open for reading. (yes, "descripter", we're keeping the typo, it's iconic.) πŸ’œ
  • GFARM_ERR_NO_FILE_SYSTEM_NODE β€” there is no available file system node. nobody's home, the node party is empty. 😭
  • GFARM_ERR_NO_MEMORY β€” insufficient memory was available. brain empty, RAM empty. 🫢
  • Others β€” an error except the above occurred. the reason is shown by gfarm_error_string(3), so go ask her, she'll spill. 🌈

🌟 SEE ALSO 🌟

gfs_pio_create(3), gfs_pio_open(3), gfs_pio_read(3), gfs_pio_sendfile(3)


and that's the whole page, bestie!! this was brought to you by Gfarm, dated 12 Aug 2015 β€” yes she's a 2015 baddie and she still slays. mwah, love u, go receive some files responsibly. πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈ