Skip to main content

A versioned file system based on FUSE and Git.

Project description

lint workflow integration tests workflow

VFS-FUSE

A versioned file system based on FUSE and Git, written in Python.

Description

VFS-FUSE is a file system that tracks every version of files, just like Git. It uses FUSE (Filesystem in Userspace) to create a user-space file system, and uses Git to store and manage file versions.

Requirements

  • Python 3.7 or later

Installation

From PyPI

pip install vfsfusepy

From Source

  1. Clone the repository:
git clone https://github.com/nero19960329/VFS-FUSE.git
  1. Install dependencies:
pip install -r requirements.txt

Usage

To use VFS-FUSE, you need to specify the directory of the Git repository and the mount point of the file system:

vfs-fuse /path/to/git_dir /path/to/mount_point  # if installed from PyPI

python vfsfusepy/__main__.py /path/to/git_dir /path/to/mount_point  # if installed from source

Where:

  • git_dir is the directory of the Git repository that will be used to store and manage file versions.
  • mount_point is the directory where the VFS-FUSE file system will be mounted.

Please ensure you have write permissions on both directories.

Example

Here is an example of how to use VFS-FUSE:

# Mount the file system
mkdir /data/vfs-root
mkdir /data/vfs-mount
vfs-fuse /data/vfs-root /data/vfs-mount

# Go to the mount point
cd /data/vfs-mount

# Create a new file
echo "Hello, World!" > test.txt

# View the file
cat test.txt

# Rename the file
mv test.txt test2.txt

# Remove the file
rm test2.txt

# Create a new directory
mkdir test_dir

# Rename the directory
mv test_dir test_dir2

# Remove the directory
rm -rf test_dir2

# View the commit history
git log

In this example, when you write to test.txt, the file system automatically commits the changes to the Git repository located at /data/vfs-root. You can then use standard Git commands to view the commit history and checkout previous versions of the file.

FAQ

Why not use Git directly?

VFS-FUSE offers automatic git commits for all file changes, creating a real-time version control system. It simplifies the use of git, allowing operations via a standard file system interface. Essentially, it's git made easy for everyday file operations.

How to solve raise EnvironmentError('Unable to find libfuse')?

You need to install the FUSE library. On Ubuntu, you can install it with the following command:

sudo apt-get update && sudo apt-get install fuse

Contributing

We welcome contributions to this repository! If you would like to contribute code, please take a moment to read our contribution guidelines.

By following these guidelines, you can ensure that your contributions are in line with our coding standards and testing procedures.

We appreciate your interest and look forward to your contributions!

License

This project is licensed under the terms of the MIT license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vfsfusepy-0.4.1.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vfsfusepy-0.4.1-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file vfsfusepy-0.4.1.tar.gz.

File metadata

  • Download URL: vfsfusepy-0.4.1.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.4

File hashes

Hashes for vfsfusepy-0.4.1.tar.gz
Algorithm Hash digest
SHA256 7d34e7077eb85eff5a80c2af9e06fc9f80ac6b5954c865c2064392769b714bfd
MD5 a3d86de60cbbfc251cdd997975502dae
BLAKE2b-256 57befe32ccfd20dc70363b721b21c6a26d7824db4f52805fd79758f5acf57f31

See more details on using hashes here.

File details

Details for the file vfsfusepy-0.4.1-py3-none-any.whl.

File metadata

  • Download URL: vfsfusepy-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.4

File hashes

Hashes for vfsfusepy-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 74c88daab26190c2986aa319441dc5761ebc48c9e0545b3092b7bc910cf691c7
MD5 df475b07be0809c20557a624b023d0b3
BLAKE2b-256 36b72e49c8d5b239cb676b7ca18755eccb51e0a0e639bc4ef066807ace8bde65

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page