Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jedevc/mafs
Quickly conjure up virtual filesystems! :sparkles::sparkles::sparkles:
https://github.com/jedevc/mafs
fuse
Last synced: 18 days ago
JSON representation
Quickly conjure up virtual filesystems! :sparkles::sparkles::sparkles:
- Host: GitHub
- URL: https://github.com/jedevc/mafs
- Owner: jedevc
- License: mit
- Created: 2018-08-16T08:13:38.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-06-02T10:52:30.000Z (over 5 years ago)
- Last Synced: 2024-10-20T17:40:42.077Z (26 days ago)
- Topics: fuse
- Language: Python
- Homepage:
- Size: 62.5 KB
- Stars: 25
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# MagicFS (mafs)
MagicFS is an easy-to-use library that allows anyone to easily create virtual
filesystems using FUSE.MagicFS allows you to redirect file requests, so instead of the request going to
an underlying storage medium like a hard drive, the request goes to a program
that you've written.If you like the idea of playing around with virtual filesystems, but have been
put off by the complexity of it all, then this library could be for you. You can
easily create whole, feature-complete filesystems in just a few lines of code.
No need for painstakingly dealing with folder structures and buffers, mafs
manages all the low-level details, provides sane defaults, and lets you focus on
the functionality.## Installation
MagicFS is available on [pypi](https://pypi.org/project/mafs/), and can be
easily installed with pip.$ pip3 install mafs
## Examples
All of the examples are listed in `examples/`. Here's a demo of running the
`places.py` example.$ mkdir fs
$ python3 examples/places.py fs
$ ls fs
place shortcut
$ ls fs/place
here there
$ cat fs/place/here
this is here
$ cat fs/place/there
this is there
$ cat fs/place/anywhere
this is anywhere!
$ fusermount -u fs## Development
To download MagicFS for development, execute the following commands:
$ git clone https://github.com/jedevc/mafs.git
$ cd mafs
$ pip3 install -r requirements.txtTo launch mafs with an example, execute the following:
$ PYTHONPATH=. python3 examples/places.py fs -fg
Note the use of the `PYTHONPATH` environment variable to include the
library, and the use of the `-fg` flag to run mafs in the foreground for
easier debugging.### Tests
To run the tests for MagicFS, install nose, and then use it to run the tests.
$ pip install nose
$ nosetestsIf you make any changes, please run the tests before you commit to ensure that
you haven't broken anything.