pr_opendir.rst (893B)
1 PR_OpenDir 2 ========== 3 4 Opens the directory with the specified pathname. 5 6 7 Syntax 8 ------ 9 10 .. code:: 11 12 #include <prio.h> 13 14 PRDir* PR_OpenDir(const char *name); 15 16 17 Parameter 18 ~~~~~~~~~ 19 20 The function has the following parameter: 21 22 ``name`` 23 The pathname of the directory to be opened. 24 25 26 Returns 27 ~~~~~~~ 28 29 - If the directory is successfully opened, a :ref:`PRDir` object is 30 dynamically allocated and the function returns a pointer to it. 31 - If the directory cannot be opened, the function returns ``NULL``. 32 33 34 Description 35 ----------- 36 37 :ref:`PR_OpenDir` opens the directory specified by the pathname ``name`` 38 and returns a pointer to a directory stream (a :ref:`PRDir` object) that 39 can be passed to subsequent :ref:`PR_ReadDir` calls to get the directory 40 entries (files and subdirectories) in the directory. The :ref:`PRDir` 41 pointer should eventually be closed by a call to :ref:`PR_CloseDir`.