go-epub icon indicating copy to clipboard operation
go-epub copied to clipboard

feature: use vfs instead os filesystem

Open KaymeKaydex opened this issue 1 year ago • 3 comments

https://github.com/blang/vfs

Currently the library can only use system files, but I would like to be able to use vfs too

KaymeKaydex avatar Nov 16 '23 08:11 KaymeKaydex

Pull request welcome Sidenote: @KaymeKaydex as i see this library not maintain actively do you know any better alternative?

Monirzadeh avatar Nov 16 '23 08:11 Monirzadeh

What's the benefit of using this vs over using io.fs?

Edit: This one seems more maintained: https://github.com/C2FO/vfs or https://github.com/spf13/afero

fmartingr avatar Nov 18 '23 07:11 fmartingr

Ok, now that I'm using io.fs more in Shiori doing some tests and refactor, I see the benefit of using a third party filesystem implementation.

A TLDR is: io.fs does not implement writer interfaces. I get to the point where I could test/implement all method that read from a filesystem, but the moment I needed to refactor the write I was stuck having to implement my own.

I'm not saying this would be beneficial for go-epub itself, just answering my own question.

fmartingr avatar Dec 17 '23 11:12 fmartingr