MCPcopy Create free account
hub / github.com/GaijinEntertainment/daScript / fsdirResetCursor

Function fsdirResetCursor

modules/dasSQLITE/sqlite/shell.c:6106–6122  ·  view source on GitHub ↗

** Reset a cursor back to the state it was in when first returned ** by fsdirOpen(). */

Source from the content-addressed store, hash-verified

6104** by fsdirOpen().
6105*/
6106static void fsdirResetCursor(fsdir_cursor *pCur){
6107 int i;
6108 for(i=0; i<=pCur->iLvl; i++){
6109 FsdirLevel *pLvl = &pCur->aLvl[i];
6110 if( pLvl->pDir ) closedir(pLvl->pDir);
6111 sqlite3_free(pLvl->zDir);
6112 }
6113 sqlite3_free(pCur->zPath);
6114 sqlite3_free(pCur->aLvl);
6115 pCur->aLvl = 0;
6116 pCur->zPath = 0;
6117 pCur->zBase = 0;
6118 pCur->nBase = 0;
6119 pCur->nLvl = 0;
6120 pCur->iLvl = -1;
6121 pCur->iRowid = 1;
6122}
6123
6124/*
6125** Destructor for an fsdir_cursor.

Callers 2

fsdirCloseFunction · 0.85
fsdirFilterFunction · 0.85

Calls 1

closedirFunction · 0.85

Tested by

no test coverage detected