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