I have written a find function which is like this :

```
public static List<File> find ( String path, String fName) {
  List<File> list = new ArrayList<>() ;
  File dir = new File(path) ;
  if( dir. isDirectory() ) {
     for( String aChild : dir. list()) {
       list = find(path + File.separator + aChild, fName) ;
     }
   }
   else {
      File[] files = dir. listFiles ( (d, name) -> name. startsWith(fName) && name. endsWith(".txt")) ;
       for(File fl : files) 
          list. add(fl) ;
   }
   return list;

   }

```

The Directory structure on my Local machine is like C:\Salary with sub directories like January, February etc. Each of the sub directory contains files like 601246\_jan\_sal.txt or 601246\_ feb\_sal.txt.
I am calling the find function like

```
List<File> filePath = Utils. find("C:\\Salary\\", "601246") ;

```

And then performing operation on each individual file.

The problem is that in the find method dir.listFiles(FileNameFilter) is returning null value.
What am I doing wrong?