FF.Reset |
nStatus = FF.Reset( hHandle AS HANDLE ) AS INTEGER
Resets the current contents of the File Finder pointed to by hHandle.
Example:
OPTION BASE 1
$LIBRARY "MyBASIC2_ExtLib" $INCLUDE "MyBASIC2_ExtLib"
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' CLS
DIM hFF AS HANDLE DIM nFiles AS INTEGER DIM i AS INTEGER DIM tmpFile AS STRING
' Folder to Search CONST cFolder = "D:\Tech\Projects\COMMON\MyBASIC2\CodeTemplates"
' Open the File Finder and search for Code Template files hFF = FF.Open( cFolder, "*.ct2", TRUE )
' Find all "normal" files nFiles = FF.Find( hFF, EL_FF_NormalFiles )
' Print Result of Search FOR i = 1 TO nFiles PRINT FF.GetFilePath( hFF, i ), ENDFOR
PRINT , PRINT "Total File(s) "; FF.GetFileCount( hFF ),
' Let's reset and search for files with sizes between 1 and 5 kb FF.Reset( hFF ) FF.SetOption( hFF, EL_FF_OPT_Size+EL_FF_OPT_Min, 1024*1 ) FF.SetOption( hFF, EL_FF_OPT_Size+EL_FF_OPT_Max, 1024*5 )
' Find them nFiles = FF.Find( hFF, EL_FF_NormalFiles )
' Print Result of Search FOR i = 1 TO nFiles PRINT FF.GetFilePath( hFF, i ), ENDFOR
PRINT , PRINT "Total File(s) "; FF.GetFileCount( hFF ),
' Close the File Finder FF.Close( hFF )
END |