-/* Scan the provided path
- Changes working directory to the provided pathname and, if successful, sends
- a directory stream of the provided path to scanner_scandir
-*/
-int scanner_scanpath
-( char const* pathname )
-{ DIR* dirp;
- errno = 0;
- if ((dirp = opendir(pathname)) == NULL || errno)
- { fprintf(stderr, "Path %s could not be accessed\n", pathname);
- return -1;
- }
- if (chdir(pathname))
- return -1;
- return scanner_scandir(dirp);
-}