Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add zipfs, an archive/zip-based read-only filesystem #146

Merged
merged 5 commits into from
Apr 10, 2020

Conversation

hillu
Copy link
Contributor

@hillu hillu commented Nov 15, 2017

No description provided.

@CLAassistant
Copy link

CLAassistant commented Nov 15, 2017

CLA assistant check
All committers have signed the CLA.

@hillu hillu force-pushed the zipfs branch 4 times, most recently from 3cdbe1e to 4d6ea2e Compare November 15, 2017 20:56
@jcftang
Copy link

jcftang commented Jul 7, 2018

Would love to see this merged as well, I was about to start on a zipfs backend myself till I saw this.

@hillu
Copy link
Contributor Author

hillu commented Aug 22, 2018

@bep Are you interested in this PR? If not, it is fine, in that case I would simply publish the zipfs package in a separate repository.

@aviau
Copy link

aviau commented Aug 23, 2018

@hillu we might be interested to merge this in https://github.com/absfs/afero

@hillu
Copy link
Contributor Author

hillu commented Aug 24, 2018

@aviau Please help yourself. :-)
(If you merge it without changes, the constructor is placed in the zipfs package which is different from the rest of the afero package...)

@bep
Copy link
Collaborator

bep commented Aug 24, 2018

I will look more at this in a few days (please bump if I don't). Can I ask, what is your current use case for this?

/cc @spf13

@hillu
Copy link
Contributor Author

hillu commented Aug 24, 2018

@bep The main (public) use case is contained in https://github.com/DCSO/spyre. The tool can either read its configuration from a ZIP file that has been appended to the executable or from files that have been placed into the same directory as the executable.

@josephlewis42
Copy link

@bep another bump for this. Our use-case is something similar, except the zip files are embedded in the executable for legal compliance.

For us, the killer feature Afero provides is support for union filesystems, allowing users to modify/override the embedded files if they desired.

@senghoo
Copy link

senghoo commented Mar 8, 2019

This package seems panic if check stat of root. would u fix it? @hillu

f, err := fs.Open("/") // this err is not nil. return a File without zipfile field.
f.Stat() // panic on nil access.

hillu added a commit to hillu/afero that referenced this pull request Mar 11, 2019
@hillu hillu force-pushed the zipfs branch 2 times, most recently from 50a2098 to 1b01115 Compare March 11, 2019 19:21
@hillu
Copy link
Contributor Author

hillu commented Mar 11, 2019

@senghoo done.

zipfs/file.go Outdated Show resolved Hide resolved
@0xmichalis 0xmichalis merged commit 55428b4 into spf13:master Apr 10, 2020
@hillu
Copy link
Contributor Author

hillu commented Apr 11, 2020

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants