Ayo Reis
Ayo Reis17mo ago

Is there a way to write to a file by replacing bytes?

Like "I am a looong file" > write('Test') > 'Test a looong file'
3 Replies
Ayo Reis
Ayo ReisOP17mo ago
This seem to be the default of FsFile.write, not sure how I didn't get that.
javi
javi17mo ago
You can use a combination of Deno.open, Deno.seek, Deno.write and Deno.close Like you would do it using the C api for instance
NDH
NDH17mo ago
Load, edit in js, save! I do that in my dev server Hot, to inject a temp code in html file for hot refresh.