As per deno documentation for writeFile if I want to write in a file and overwrite if the file already exists I need this command -
await Deno.writeFile("hello1.txt", data); // overwrite "hello1.txt" or create it
What I need is to create an empty file and if a file with the same name already exists overwrite it with an empty file, so I tried to run the function without data and I am getting this error.
await Deno.writeFile("hello1.txt");
An argument for 'data' was not provided.
data: Uint8Array,
How can I create an empty file in Deno and overwrite any file exists with the same name?