MCPcopy Create free account
hub / github.com/OpenKinect/libfreenect2 / closedir

Function closedir

tools/streamer_recorder/include/msdirent.h:321–338  ·  view source on GitHub ↗

* Close directory stream opened by opendir() function. Close of the * directory stream invalidates the DIR structure as well as any previously * read directory entry. */

Source from the content-addressed store, hash-verified

319 * read directory entry.
320 */
321static int closedir(DIR *dirp)
322{
323 if (dirp == NULL) {
324 /* invalid directory stream */
325 DIRENT_SET_ERRNO (EBADF);
326 return -1;
327 }
328
329 /* release search handle */
330 if (dirp->search_handle != INVALID_HANDLE_VALUE) {
331 FindClose (dirp->search_handle);
332 dirp->search_handle = INVALID_HANDLE_VALUE;
333 }
334
335 /* release directory structure */
336 free (dirp);
337 return 0;
338}
339
340
341/*****************************************************************************

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected