Lines Matching refs:path
492 char* path;
498 path = (char*) malloc(dirLength + 3);
499 if (!path) return 0;
501 memcpy(path, dirName, dirLength);
502 path[dirLength] = '\\';
503 path[dirLength+1] = '*';
504 path[dirLength+2] = 0;
506 hFile=FindFirstFileA(path, &cFile);
511 free(path);
516 path = (char*) malloc(dirLength + fnameLength + 2);
517 if (!path) { FindClose(hFile); return 0; }
518 memcpy(path, dirName, dirLength);
519 path[dirLength] = '\\';
520 memcpy(path+dirLength+1, cFile.cFileName, fnameLength);
522 path[pathLength] = 0;
527 nbFiles += UTIL_prepareFileList(path, bufStart, pos, bufEnd); /* Recursively call "UTIL_prepareFileList" with the new path. */
528 if (*bufStart == NULL) { free(path); FindClose(hFile); return 0; }
535 if (*bufStart == NULL) { free(path); FindClose(hFile); return 0; }
538 strncpy(*bufStart + *pos, path, *bufEnd - (*bufStart + *pos));
543 free(path);
571 char* path;
576 path = (char*)malloc(dirLength + fnameLength + 2);
577 if (!path) { closedir(dir); return 0; }
578 memcpy(path, dirName, dirLength);
579 path[dirLength] = '/';
580 memcpy(path+dirLength+1, entry->d_name, fnameLength);
582 path[pathLength] = 0;
584 if (UTIL_isDirectory(path)) {
585 nbFiles += UTIL_prepareFileList(path, bufStart, pos, bufEnd); /* Recursively call "UTIL_prepareFileList" with the new path. */
586 if (*bufStart == NULL) { free(path); closedir(dir); return 0; }
592 if (*bufStart == NULL) { free(path); closedir(dir); return 0; }
595 strncpy(*bufStart + *pos, path, *bufEnd - (*bufStart + *pos));
600 free(path);