GFS_STAT(3)

✨ GFS_STAT(3) ✨

okay bestie, welcome to the GFS_STAT(3) page from the Gfarm manual β€” this is the one that tells you everything about a file πŸ‘‘


🌸 NAME 🌸

gfs_stat β€” get file status. that's it, that's the vibe. you ask, it answers πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <gfarm/gfarm.h>

gfarm_error_t gfs_stat(const char * gfarm_url,
                       struct gfs_stat * status);

✨ DESCRIPTION ✨

so like. gfs_stat() hands you back the info about the file that gfarm_url points to, and it fills in the buffer that status points at 🫢

⚠️ but listen β€” status contains a pointer to memory that got allocated dynamically, so you have to free that memory yourself with gfs_stat_free(3). do not ghost it. it will leak. no cap 😭

πŸ’– RETURN VALUES πŸ’–

  • GFARM_ERR_NO_ERROR β€” slay, it worked, the function terminated successfully ✨
  • GFARM_ERR_NO_MEMORY β€” not enough memory was available. the struggle πŸ’€
  • GFARM_ERR_AUTHENTICATION β€” user authentication failed when connecting to gfmd(8). like, who are you?? πŸ™ˆ
  • GFARM_ERR_PERMISSION_DENIED β€” gfarm_url points outside your accessible address space. not yours, don't touch 🚫
  • GFARM_ERR_NO_SUCH_OBJECT β€” gfarm_url does not exist. it's giving nothing because there is literally nothing 😭
  • GFARM_ERR_NOT_A_DIRECTORY β€” a component of the path prefix is not a directory. bestie that's a file pretending to be a hallway πŸ’€
  • Others β€” some other error happened, not one of the ones above. the reason gets shown by gfarm_error_string(3) πŸ”

🌈 SEE ALSO 🌈


and that's the whole page, bestie!! this was the Gfarm manual, 24 Jun 2019, page GFS_STAT(3) β€” go forth and stat responsibly πŸ’œβœ¨πŸŽ€