afero icon indicating copy to clipboard operation
afero copied to clipboard

[QUESTION] Convert embed.FS to afero.MemMapFS

Open dzonerzy opened this issue 2 years ago • 1 comments

As the title says is it possible to convert and embed.FS to a MemMapFS? This way I can make the memory FS writable too.

I want to use that FS within fiber, this FS will contains html templates, so a wanna have a set of predefined/default templates defined as (embed.FS) but I also want to be able to add more templates at runtime, thus the request to convert embed.FS to MemMapFS

dzonerzy avatar Dec 14 '22 15:12 dzonerzy

As the title says is it possible to convert and embed.FS to a MemMapFS?

That's not possible. There is an adapter that allows yo to create a fs.Fs from a MemMapFS, but there will be no write operations.

bep avatar Mar 06 '23 09:03 bep