Lines Matching defs:dir
140 * Add the dir to the g_OpenDirs map.
141 * @param[in] dir The dir to add to g_OpenDirs.
144 static int AddDirToMap(DIR* dir) {
145 return AddToMap((void**)g_OpenDirs, MAX_OPEN_DIRS, dir);
149 * Remove the dir from the g_OpenDirs map.
150 * @param[in] i The index of the dir handle to remove. */
156 * Get a dir, given a string containing the index.
157 * @param[in] s The string containing the dir index.
158 * @param[out] dir_index The index of this dir.
159 * @return The DIR* for this dir, or NULL if the index is invalid.
482 DIR* dir;
493 dir = opendir(dirname);
494 if (!dir) {
499 dir_index = AddDirToMap(dir);
502 "Error: Example only allows %d open dir handles.", MAX_OPEN_DIRS);
531 DIR* dir;
541 dir = GetDirFromIndexString(dir_index_string, NULL);
543 if (!dir) {
544 *output = PrintfToNewString("Error: Unknown dir handle %s.",
549 entry = readdir(dir);
580 DIR* dir;
591 dir = GetDirFromIndexString(dir_index_string, &dir_index);
592 if (!dir) {
593 *output = PrintfToNewString("Error: Unknown dir handle %s.",
598 result = closedir(dir);