4 ms·
Can you explain what zip filesystem is?
by packetlost 2y ago
Can you explain what zip filesystem is?
- mdaniel 2y agoA handler for treating .zip (and .jar and .tar ...) files as if they were a volume mounted at /home/user/foo.zip - e.g. https://github.com/openjdk/jdk/blob/jdk-21-ga/src/java.base/share/classes/java/net/JarURLConnection.java#L48 https://github.com/openjdk/jdk/blob/jdk-21-ga/src/java.base/... It may be easier to reason about when thinking of the way $(mount -o loop) works with .iso files -- a file that is a container for other files that one can mount as if it were a filesystem I was expecting pathlib in Python <https://docs.python.org/3/library/pathlib.html https://docs.python.org/3/library/pathlib.html> to have one since a lot of Python distributions ship the standard library in .zip files but evidently not. Python gonna Python in that way Firefox actually used to ship with that same "jar:" protocol handler, too, and I made good use of it for reading the javadoc html which was shipped inside zip files and was indescribably easier than trying to manage all the .html files in a Java 8 SDK distribution. They made heavy use of this because a lot of their internals were in .xpi formats (which is also a .zip file) but they recently dropped it because Firefox gonna Firefox^W double down on some random shit other than making a sane browser
- boltzmann-brain 2y agothey should do the same but for git repositories too
- formerly_proven 2y agoPython has something kinda like VFS support just as a very special case for importing stuff and reading associated data files, see Anchor ("mount point") and Traversable ("virtual Path") in https://docs.python.org/3.12/library/importlib.resources.abc.html https://docs.python.org/3.12/library/importlib.resources.abc... - the actual implementation is done in finders et al (https://docs.python.org/3.12/library/importlib.html#module-importlib.abc https://docs.python.org/3.12/library/importlib.html#module-i...)
- eadmund 2y agoEmacs implements something like this too! It’s pretty useful to be able to just enter a tarball and work with the files in it. It looks like https://github.com/cybernoid/archivemount https://github.com/cybernoid/archivemount provides a similar experience in the shell, although one would have to mount the file first.
- kragen 2y agonot .tar
- sbstp 2y agoI'm not a TCL user, but from the description of wduquette is sounds similar to Python's zipapp https://docs.python.org/3/library/zipapp.html https://docs.python.org/3/library/zipapp.html
- oldlaptop 2y agoThe definition of "standalone application" is a bit stronger - what's always been possible with "Tclkits" has been to embed the application code in an interpreter binary and distribute that, and the new core zipfs supports that as well.
- wduquette 2y agoYes, exactly. You can package up your entire scripted application, plus all resources, into a single executable, and distribute that single file.