Some libuv filesystem functions expect the numeric mode argument to be an octal representation of the equivalent chmod(1) mode. This is potentially surprising behaviour to anyone who hasn't used either libuv or glibc from C. The documentation for e.g. fs_mkdir in libuv defers to mkdir(2) which defers to mode_t(3) which only says "It is an integer type". Furthermore, fs_access uses a different mode type, validated using
luv_check_amode, which can accept strings ("symbolic mode" in chmod(1)). I chose not to mention that this one still technically accepts an integer because I have no idea about the restrictions of said integer.
Some libuv filesystem functions expect the numeric
mode
argument to be an octal representation of the equivalentchmod(1)
mode. This is potentially surprising behaviour to anyone who hasn't used eitherlibuv
orglibc
from C. The documentation for e.g.fs_mkdir
in libuv defers tomkdir(2)
which defers tomode_t(3)
which only says "It is an integer type". Furthermore,fs_access
uses a differentmode
type, validated using luv_check_amode, which can accept strings ("symbolic mode" inchmod(1)
). I chose not to mention that this one still technically accepts an integer because I have no idea about the restrictions of said integer.