itinance / itinance/react-native-fs
is there anyway to read directory recursively to get sub folder and items in it
- Dominant language
- C++
- Stars
- 5k
- Forks
- 1k
- PR merge metrics
- No merged PRs in 30d
Description
I can able to read the files in a directory using following function
```
const path = RNFS.DocumentDirectoryPath;
RNFS.readDir(path)
.then((result) => {
console.warn(result);
const Files = [];
if(result != undefined && result.length > 0){
for(index in result) {
const item = result[index];
console.log(item);
if(item.isFile()){
Files.push(item);
}
}
if(Files.length > 0) {
callback(Files);
}
else{
callback(null);
}
}
else{
callback(null);
}
})
.catch(err => {
console.log('err in reading files');
console.log(err);
callback(null);
})
```
But i want to read the directory and it's subdirectory and the files belongs to them, is there any way to achieve it?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.