This repository was archived by the owner on Mar 16, 2019. It is now read-only.
This repository was archived by the owner on Mar 16, 2019. It is now read-only.
What's the logic behind naming cached files? #441
Open
Description
please provide the version of installed library and RN project.
^0.10.5, React Native 0.45.1
I downloaded some files with fileCache: true
but without a path
parameter. I found that in my tests, these files were saved in the DocumentDir in directories RNFetchBlob_tmp
on iOS and RNFetchBlobTmp
in Android. Is this dependent on the OS version or something else? Is the function I use below to clear all old cached files correct?
export function clearOldCachedFiles (files) {
const isOldCache = fileName => fileName.startsWith('RNFetchBlob_tmp') || fileName.startsWith('RNFetchBlobTmp')
return Promise.all(files.filter(isOldCache).map(fileName => {
return RNFetchBlob.fs.unlink(`${directories.DocumentDir}/${fileName}`)
}))
}