GFS_MKDIR(3)
β¨ GFS_MKDIR(3) β¨
okay bestie, gather round, because this is the Gfarm manual page for gfs_mkdir, section 3 of the library calls π
she's a libc-flavored girlie, not a command-line one, so she lives in your code, not your shell.
πΈ NAME πΈ
gfs_mkdir β bestie, she makes a directory. that's it. that's the whole job. iconic behavior, no notes π
π¦ SYNOPSIS π¦
#include <gfarm/gfarm.h>
gfarm_error_t gfs_mkdir(const char * gfarm_url, gfarm_mode_t mode);
like. look at her. two args. one job. main character energy fr fr β¨
π DESCRIPTION π
so gfs_mkdir() attempts to create a directory named gfarm_url. that's the vibe. that's the assignment. she ate and left no crumbs π
and mode? that's where you tell her the permissions to use. lowkey important: it gets modified by the process's umask in the usual way β the permissions of the created file end up being (mode & ~umask). no cap, that's just how it goes π
not me reminding you that umask is silently editing your whole permission situation behind your back π she's not doing anything wrong, she's just following the rules.
π₯ RETURN VALUES π₯
okay so here's the vibe check on what she hands back to you:
GFARM_ERR_NO_ERRORβ she did it!! the function terminated successfully, we love a win πGFARM_ERR_NO_MEMORYβ insufficient memory was available π girl is running on fumes, there was just not enough memory to go around.GFARM_ERR_ALREADY_EXISTSβgfarm_urlalready exists. and bestie, that does not necessarily mean it's a directory. this includes the case wheregfarm_urlis a symbolic link, dangling or not. so like, it's taken. the name is taken. move on πGFARM_ERR_NO_SUCH_OBJECTβ the parent directory ofgfarm_urldoes not exist. you can't put a folder inside a folder that isn't there, that's just math π§GFARM_ERR_NOT_A_DIRECTORYβ a component of the path prefix is not a directory. something along the way is cosplaying as a folder and it is NOT one π- Others β an error except the above occurred. the reason is shown by
gfarm_error_string(3), so go ask her, she'll explain β¨
and that's the whole page bestie!! this one came from the Gfarm girlies, dated 23 Jun 2019, and it's filed under section 3 π go forth and make directories responsibly, mwah ππ¦πΈ
π¦ where this page comes from
- debian bookworm: libgfarm-dev 2.7.20+dfsg-1+b2 Β· BSD-like
- debian trixie: libgfarm-dev 2.7.20+dfsg-1.2+b1 Β· BSD-like
- ubuntu jammy: libgfarm-dev 2.7.17+dfsg-1build2 Β· BSD-like
- ubuntu noble: libgfarm-dev 2.7.20+dfsg-1.1ubuntu1 Β· BSD-like
- ubuntu questing: libgfarm-dev 2.7.20+dfsg-1.2
- ubuntu resolute: libgfarm-dev 2.7.20+dfsg-1.3 Β· BSD-like
- ubuntu stonking: libgfarm-dev 2.7.20+dfsg-1.3build1 Β· BSD-like
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms