We're looking for a person or people to help audit MDN to find places we could speed up. Is this you or someone you know? Check out the RFP: https://mzl.la/2IHcMiE


Opens the directory with the specified pathname.


#include <prio.h> 

PRDir* PR_OpenDir(const char *name);


The function has the following parameter:

The pathname of the directory to be opened.


  • If the directory is successfully opened, a PRDir object is dynamically allocated and the function returns a pointer to it.
  • If the directory cannot be opened, the function returns NULL.


PR_OpenDir opens the directory specified by the pathname name and returns a pointer to a directory stream (a PRDir object) that can be passed to subsequent PR_ReadDir calls to get the directory entries (files and subdirectories) in the directory. The PRDir pointer should eventually be closed by a call to PR_CloseDir.

Document Tags and Contributors

 Contributors to this page: teoli, alecananian
 Last updated by: teoli,