Skip to content

dotmpe/x-python-vfs

Repository files navigation

Python VFS (Virtual Filesystem)

created

2017-05-25

updated

2018-03-28

license

Simplified BSD

status

image

repo license

commits per year

image

image

master:

last-commit on master

dev:

last-commit on dev

test:

last-commit on test

This document is on the current implementation, see also intro.

Getting Started

Examples:

python x-fuse.py /tmp/x-fuse/ "OSPassthrough('$PWD')"
python x-fuse.py /tmp/x-fuse "OSStack('$PATH')"
python x-fuse.py /tmp/x-fuse "HideBrokenSymlinks('$PWD')"

Generic invocation takes a python expression to initialize filesystem:

python x-fuse.py ./my/path/to/mount/ "<FSType>(<FSArgs>)" [ FSName [ PIDFile ]]

These environment variables are picked up to customize FUSE behaviour; defaults:

X_FUSE_THREADS=false
X_FUSE_BACKGROUND=true

Testing

make test

Issues

  • can't test pyvfs and py9p on OSX:

    $ mount -t 9p -o ro,port=10001 127.0.0.1 /mnt/py9p-test/
    mount: exec /Library/Filesystems/9p.fs/Contents/Resources/mount_9p for
    /mnt/py9p-test: No such file or directory
  • gdrivefs must be compiled, which it doesn't manage on my OSX/Darwin.

ToDo

  • Add-in LoggingMixIn, see fusepy/examples.
  • Build a slightly more complex OSPassthrough with path renames/filtering. Besides names also may want to map or filter on type (file/dir/special), size, access mode.
  • May want to have a go with other libs: (py)vfs/objfs, py9p. fusecry seems to install cleanly also.

Further reading

Some other things to look at. At PyPi12, at GitHub3.

On a sidenode, PyFilesystem is a suite aiming to bring a universal file-like interface regardless of the reality.4 Very neat, does it mount too?


  1. <https://pypi.python.org/pypi?%3Aaction=search&term=vfs&submit=search>

  2. <https://pypi.python.org/pypi?%3Aaction=search&term=filesystem&submit=search>

  3. <https://github.com/topics/filesystem>

  4. <https://www.pyfilesystem.org/>

About

Python FUSE filesystems, maybe other VFSs..

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published