Unicode Controls & Classes for VB6 - Version 4

clsSearchFilesAL.SearchInPathAL Function

Searches in the specified path for every file/folder contained; returns a cArrayList of [clsSearchFilesFInfo] objects

Syntax
Public Function SearchInPathAL (ByVal sPath As String, _
Optional ByVal iSearchWhat As eSearchFilesWhat = esfw_all, _
Optional ByVal bRecurseSubDirs As Boolean = False, _
Optional ByVal bAsync As Boolean = False, _
Optional ByVal bReturnThisAndBaseDirs As Boolean = False, _
Optional ByVal lMaxResults As Long = -1&, _
Optional ByVal bHierarchicalCollection As Boolean = False) As cArrayList
Parameters
Parameter Description
ByVal sPath As String The starting path
Optional ByVal iSearchWhat As eSearchFilesWhat = esfw_all The search flag
Optional ByVal bRecurseSubDirs As Boolean = False Should the function recurse on sub-folders?
Optional ByVal bAsync As Boolean = False Executes the function in asynchronous mode; in this case use the [IsSearching] method for checking when the function has finished and use the [StopSearch] method to stop the search
Optional ByVal bReturnThisAndBaseDirs As Boolean = False If True returns the "." and ".." folders as a part of the returned list of objects
Optional ByVal lMaxResults As Long = -1& If specified, returns a maximum of lMaxResults objects
Optional ByVal bHierarchicalCollection As Boolean = False If specified, the function doesn't return a Flat collection but a Hierarchical collection;
in this case, you'll find folder files into each [clsSearchFilesFInfo.oCollSubFiles] collection so you need a recursive function to explore the tree.
Very useful for creating a treeview with files and folders
Remarks