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
This seem to be the default of
FsFile.write
, not sure how I didn't get that.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 instanceLoad, edit in js, save!
I do that in my dev server
Hot
, to inject a temp code in html file for hot refresh.