Lines Matching refs:pDir

49 static DECLCALLBACK(bool) rtDirFilterWinNtMatch(PRTDIR pDir, const char *pszName);
50 static DECLCALLBACK(bool) rtDirFilterWinNtMatchNoWildcards(PRTDIR pDir, const char *pszName);
116 * @param pDir The directory handle.
119 static DECLCALLBACK(bool) rtDirFilterWinNtMatchNoWildcards(PRTDIR pDir, const char *pszName)
124 PCRTUNICP pucFilter = pDir->puszFilter;
446 * @param pDir The directory handle.
449 static DECLCALLBACK(bool) rtDirFilterWinNtMatch(PRTDIR pDir, const char *pszName)
451 return rtDirFilterWinNtMatchBase(0, pszName, pDir->puszFilter);
460 * @param pDir The directory handle (not yet opened).
462 static PFNRTDIRFILTER rtDirFilterWinNtInit(PRTDIR pDir)
467 if ( (pDir->cchFilter == 1 && pDir->pszFilter[0] == '*')
468 || (pDir->cchFilter == 3 && !memcmp(pDir->pszFilter, "<\".>", 3))
478 while (iRead < pDir->cucFilter)
480 RTUNICP uc = pDir->puszFilter[iRead++];
486 while ((uc2 = pDir->puszFilter[iRead + 1]) == '*')
493 pDir->puszFilter[iWrite++] = uc;
495 pDir->puszFilter[iWrite] = 0;
496 pDir->cucFilter = iWrite;
571 PRTDIR pDir = (PRTDIR)RTMemAllocZ(cbAllocated);
572 if (!pDir)
574 uint8_t *pb = (uint8_t *)pDir + cbDir;
577 pDir->u32Magic = RTDIR_MAGIC;
578 pDir->cbSelf = cbDir;
581 pDir->puszFilter = (PRTUNICP)pb;
582 rc = RTStrToUniEx(pszFilter, RTSTR_MAX, &pDir->puszFilter, cucFilter0, &pDir->cucFilter);
585 pDir->pszFilter = (char *)memcpy(pb, pszFilter, cbFilter);
586 pDir->cchFilter = cbFilter - 1;
591 pDir->puszFilter = NULL;
592 pDir->cucFilter = 0;
593 pDir->pszFilter = NULL;
594 pDir->cchFilter = 0;
596 pDir->enmFilter = enmFilter;
601 pDir->pfnFilter = NULL;
604 pDir->pfnFilter = rtDirFilterWinNtInit(pDir);
607 pDir->pfnFilter = NULL;
610 pDir->pfnFilter = NULL;
613 pDir->cchPath = cchRealPath;
614 pDir->pszPath = (char *)memcpy(pb, szRealPath, cchRealPath + 1);
615 Assert(pb - (uint8_t *)pDir + cchRealPath + 1 <= cbAllocated);
616 pDir->fDataUnread = false;
617 pDir->pszName = NULL;
618 pDir->cchName = 0;
623 rc = rtDirNativeOpen(pDir, szRealPath);
625 *ppDir = pDir;
627 RTMemFree(pDir);