/fuse-archive

FUSE file system for archives and compressed files (ZIP, RAR, 7Z, ISO, TGZ, XZ...)

Primary LanguageC++Apache License 2.0Apache-2.0

fuse-archive

Note

The only changes made to this fork of the original repo are in the Makefile and this README to enable compilation and usage on macOS. Specifically:

  1. Makefile Adjustments:

  2. README Updates:

    • Added detailed installation instructions for macOS, including dependencies and environment variable setup.
    • Added usage examples and instructions for mounting archives with fuse-archive.

Disclaimer

I am not affiliated with Google. See the original README for more information, and for anything else, please refer to the canonical source codebase.

I am not responsible for any actions you take or any consequences that arise from using this code. Use it at your own risk.


Installation Instructions for macOS

Prerequisites

Ensure you have Homebrew installed. If not, you can install it by following the instructions at brew.sh.

Dependencies

Install the required dependencies using Homebrew:

brew install libarchive macfuse pkg-config

Building the Project

Clone the repository

git clone https://github.com/Alchemyst0x/fuse-archive.git && cd fuse-archive

Alternatively, if you'd rather clone the original repo and modify the Makefile yourself:

git clone https://github.com/google/fuse-archive.git && cd fuse-archive

Set the PKG_CONFIG_PATH environment variable

Locate libarchive.pc and add the directory containing this file to the PKG_CONFIG_PATH variable, e.g.:

find $(brew --prefix) -name libarchive.pc
# Output:
# /opt/homebrew/Cellar/libarchive/3.7.4/lib/pkgconfig/libarchive.pc
export PKG_CONFIG_PATH="/opt/homebrew/Cellar/libarchive/3.7.4/lib/pkgconfig:/usr/local/lib/pkgconfig"

Build the project

make all

Installing the Binary

Install the binary to /usr/local/bin:

sudo make install

Usage

Run the fuse-archive binary with the -h flag to see the usage instructions:

./out/fuse-archive -h

Example

For example, to mount a ZIP archive on a macOS system, you might do the following:

sudo fuse-archive -o allow_other /Users/YourUsername/some_zip_file.zip /Volumes/some_mounted_zip

You can then verify the mount was successful, e.g.:

ls /Volumes/some_mounted/zip

Uninstalling

To uninstall the binary:

sudo make uninstall