react-native-android-filelist
v0.0.1
Published
`npm install --save react-native-android-filelist`
Downloads
4
Readme
REACT-NATIVE-ANDROID-filelist
This module is helpful in fetching all the specified files from android devices.
To Install ,
npm install --save react-native-android-filelist
Importing ,
import getFiles from 'react-native-android-filelist'
Syntax ,
getFiles(path:string,type:array|string('image','video','audio','pdf','all'),callback)
Note : getFiles is not the mandatory name, So can name it anyhow.
Output ,
{
file:<file>[string],
path:<path>[string],
size:<size>[bytes],
type:<type>[string]
}
//This returns status of the files in a consecutive manner (one after other) .
Usage ,
import getFiles from 'react-native-android-filelist'
let array = [];
getFiles('/storage/emulated/0','images',(status)=>{
console.log(status);
array.push(status)
})
...
...
<Flatlist data={array} ... >
Issues ,
This module makes use of recursion to retrieve files ,so there is no way to indicate the end of the files retrieval process .