react-native-fs
react-native-fs copied to clipboard
How to write file to assets
We have readFileAssets, but no writeFileAssets how can I write files to android assets folder
or how the relative path between assets folder and DocumentDirectory?
Below is the problem I got in real word:
I have a index.html file in \android\app\src\main\assets for my webview component and in this html I include some CSS files like<link rel="stylesheet" type="text/css" href="./index.css" /> if I put those CSS files under the \android\app\src\main\assets then it works fine but now some CSS files will be download from API.
I can save them to DocumentDirectory folder but can't save them to assets folder so I can't include those CSS file, anything will be help. Thank you.
We have
readFileAssets, but nowriteFileAssetshow can I write files to android assets folder or how the relative path between assets folder and DocumentDirectory?Below is the problem I got in real word:
I have a index.html file in
\android\app\src\main\assetsfor my webview component and in this html I include some CSS files like<link rel="stylesheet" type="text/css" href="./index.css" />if I put those CSS files under the\android\app\src\main\assetsthen it works fine but now some CSS files will be download from API.I can save them to DocumentDirectory folder but can't save them to assets folder so I can't include those CSS file, anything will be help. Thank you.
Hi @goalbased Did you find any solution?
I am also interested in doing this. Any luck?
i'm also interested in doing this, please leave a comment if anyone did this.
??? readFileAssets ???