Simple in-memory FSΒΆ

You can just import VFS as is and start the server. It will create a slow and resource-hungry analogue of tmpfs. By itself it has no use, unless you want to share your memory-based FS via network. But you can write your own file implemenations on the base of pyvfs.vfs. E.g., you can parse and utilize the file contents on write(), create simple data channels and FS-based RPC interfaces.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
#!/usr/bin/env python3

from pyvfs.utils import Server

#
# The protocol and options will be set up after
# environment variables, see documentation.
#
srv = Server()
#
# run server in the foreground
#
srv.run()