I know react-native-fs and react-native-fetch-blob, but I'm missing simple helper functions like getFileInfo(file)
.
Desired pseudo code:
let fileInfo = getFileInfo('path/to/my/file.txt');
console.log('file size: ' + fileInfo.size);
console.log('mime type: ' + fileInfo.type);
console.log('extension: ' + fileInfo.extension);
What's the proper way to get the file size, mime type and extension?
Thanks in advance!