pr_mkdir.rst (1500B)
1 PR_MkDir 2 ======== 3 4 Creates a directory with a specified name and access mode. 5 6 7 Syntax 8 ------ 9 10 .. code:: 11 12 #include <prio.h> 13 14 PRStatus PR_MkDir( 15 const char *name, 16 PRIntn mode); 17 18 19 Parameters 20 ~~~~~~~~~~ 21 22 The function has the following parameters: 23 24 ``name`` 25 The name of the directory to be created. All the path components up 26 to but not including the leaf component must already exist. 27 ``mode`` 28 The access permission bits of the file mode of the new directory if 29 the file is created when ``PR_CREATE_FILE`` is on. 30 31 Caveat: The mode parameter is currently applicable only on Unix 32 platforms. It may be applicable to other platforms in the future. 33 34 Possible values include the following: 35 36 - :ref:`00400`. Read by owner. 37 - :ref:`00200`. Write by owner. 38 - :ref:`00100`. Search by owner. 39 - :ref:`00040`. Read by group. 40 - :ref:`00020`. Write by group. 41 - :ref:`00010`. Search by group. 42 - :ref:`00004`. Read by others. 43 - :ref:`00002`. Write by others. 44 - :ref:`00001`. Search by others. 45 46 47 Returns 48 ~~~~~~~ 49 50 - If successful, ``PR_SUCCESS``. 51 - If unsuccessful, ``PR_FAILURE``. The actual reason can be retrieved 52 via :ref:`PR_GetError`. 53 54 55 Description 56 ----------- 57 58 :ref:`PR_MkDir` creates a new directory with the pathname ``name``. All the 59 path components up to but not including the leaf component must already 60 exist. For example, if the pathname of the directory to be created is 61 ``a/b/c/d``, the directory ``a/b/c`` must already exist. 62 63 64 See Also 65 -------- 66 67 :ref:`PR_RmDir`