Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70442

Best method for rewrite/overwrite a file in filesystem using File plugin

$
0
0

Maybe this is a very simple and obvious question, but I didn’t find the answer anywhere and I would like to be sure before implementing it in my app.

The File plugin gives us 2 methods to rewrite a file, at least I could tell. The first is using method createFile() with option replace = true, which will remove the contents of the original file. Then it is possible to write into that file using the method writeExistingFile().

The second option is through method removeFile(), which will remove the file, then it is possible to create a new file with the same name through method writeFile().

I would like to know which of these methods is the most efficient or if there is an even better method that I haven’t mentioned.

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 70442

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>