mini-fs icon indicating copy to clipboard operation
mini-fs copied to clipboard

Add write support

Open ngirard opened this issue 5 years ago • 2 comments

Hey,

I'm involved in the IconPie project, and we are contemplating using your crate.

Unfortunately we would need to be able to write data, which is currently not implemented, unless I'm mistaken.

Could you consider adding write support to mini_fs ?

Cheers!

ngirard avatar Sep 14 '19 07:09 ngirard

I think it might be doable, but not without some refactoring first as I'm not too happy with the API design. Unfortunately I don't have much free time to work on this at the moment.

Also not sure if TarFsFile and ZipFsFile can support Write though...

germangb avatar Sep 14 '19 12:09 germangb

Hi there. I'm also involved in the IconPie project.

On regards to the fact that TarFsFile and ZipFsFile cannot support Write, the functionality of Write could be contained in a super trait of Store, so that not all Store implementors are required to support it.

So, it could look something like this:

pub trait Write: Store {
    fn write(&self) -> io::Result<()> {
        // . . .
    }
}

GarkGarcia avatar Oct 27 '19 12:10 GarkGarcia