Enumerate files and directories
To read the directory contents and enumerate the child directories and files, use the following sequence of calls:
- Call FindFirst() or FindFirstEx() methods of SolFSStorage class to initiate search. FindFirstEx() is faster version of FindFirst() as it lets you specify, which attributes to retrieve (retrieval of time attributes takes certain time, so if you don't need times of the file, use FindFirstEx and exclude times from retrieval).
- The call to FindFirst/FindFirstEx will return you the first matching file (if any were found). If the initial search was successful, call FindNext() method of SolFSStorage class to get information about the next file that matches the search parameters. Call FindNext() in a loop to pick other results until this method returns false.
- If the search was successful and at least one result was found, call FindClose() method of SolFSStorage class to release the resources, allocated for the search.