I am working on a file Manager application, if user search for a keyword then all the files and folders which are available at given path,filename should listed in a table view which have that search keyword. The Search must be same as in finder for specific folder.
Issue is - When I search any keyword it's display only current folder or files which in table view but I want to display all subfolder's files also.
E.g
LocalFolder
->> **folder1**
-->f1.txt
-->f2.png
-->folder11
->> **folder2**
In this case, when you search something it display current folder/files like folder1 and folder2. I need to find into subdirectory also.
I'm not sure how you made the file search, but i assume you use
contentsOfDirectoryAtPath
while getting paths from the search directory. UsesubpathsOfDirectoryAtPath
insteadcontentsOfDirectoryAtPath
, it retruns the paths of all of the contained subdirectories.Look documentation for more information.