File System

File System opendir

opendir

// INCLUDE
#include <dirent.h>

// PROTOTYPE
DIR* opendir(const char* pathname)

Open a directory stream to iterate the files in the directory. Be sure to close the directory when done using closedir. Do not attempt to free the returned DIR*, only use closedir.

  • pathname: The pathname to the directory (Unix-style, with forward slash as the directory separator).

Returns NULL (0) on error, or a non-zero value for use with readdir.