Ayo Reis
Ayo Reis12mo 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 Reis12mo ago
This seem to be the default of FsFile.write, not sure how I didn't get that.
javi
javi12mo 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
NDH12mo 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.