title: Recursivly scan sd card android ndk
body: <p>I'm really new in android ndk and I appreciate any help. How can I create recursive folder scanning in c++ with the checking extension ? I know it's really easy to do in java. In java I use this: </p>
  
  <pre><code>public void scan(File root) {
          File[] list = root.listFiles(tracksFilter);
          for (File f : list) {
              String path;
              if (f.isDirectory()) {
                  scan(f);
              } else if(path.endWith(".mp3"){
                   doMP3(f);
              } else if(path.endWith(".png"){
                   doPNG(f);
              }
          }
      }
  </code></pre>