Search for audio files on phone using React Native
<p>I'm using react native to develop a music app and I'm stuck trying to figure out the best way to search for and play audio files already saved on the clients phone. I'm just not sure what would be the best modules/libraries to solve this problem, or whether the iOS/Android OS allows this type of access to user files at all.</p>

<p>I'm using <a href="https://github.com/zmxv/react-native-sound" rel="noreferrer">react-native-sound</a> to play audio files and I've found the <a href="https://github.com/johanneslumpe/react-native-fs" rel="noreferrer">react-native-fs</a> module and this looks close to what I feel I need to search for audio files. There's a readDir function, but you pass it directory path constants like MainBundlePath, CachesDirectoryPath, DocumentDirectoryPath etc:</p>

<pre><code>// require the module
var RNFS = require('react-native-fs');

// get a list of files and directories in the main bundle
RNFS.readDir(RNFS.MainBundlePath)
</code></pre>

<p>With:
 1. MainBundlePath - The absolute path to the main bundle directory
 2. CachesDirectoryPath - The absolute path to the caches directory
 3. DocumentDirectoryPath - The absolute path to the document directory</p>

<p>Would any of these directories be where I look to find audio files already stored on the clients phone?</p>