>>-v_mkdir--vntoken--directoryname--mode--stem--vntoken2-------><
Function
v_mkdir invokes the v_mkdir callable service to create
a new empty directory in the directory represented by vntoken,
with the permission specified in mode.
Parameters
- vntoken
- A variable name that contains the vnode token for the directory
in which filename is to be created.
- directoryname
- The name of the directory.
- mode
- A three-digit number, corresponding to the access permission
bits for the directory. Each digit must be in the range 0–7, and all three digits must be specified. For more information
on permissions, see REXX predefined variables.
- stem
- The same file attribute information is returned in stem as
if a v_getattr had been used on the file specified. Upon return, stem.0 contains the number of attribute variables returned. To access
the attribute information, you can use a numeric value or the predefined
variables beginning with ST_ used to derive the numeric value. See stat for a list of the predefined variables, or REXX predefined variables for the numeric values.
- vntoken2
- The variable name for the buffer that will contain the vnode
token for the newly created directory.
Usage notes
- If the directory that is named in directoryname already
exists, the v_mkdir service returns a failing return code, and no vntoken2 is returned.
- The caller is responsible for freeing vnode tokens returned by
the v_mkdir service by calling to the v_rel service when they are
no longer needed.
Example
In the following example, assume that
dirtok,
file,
and
perm were assigned values earlier in the exec:
"v_mkdir dirtok (file)" perm "st. newtok"