I have a memory filesystem in Python, created in the following fashion:
import fs
mem_fs = fs.open_fs('mem://')
mem_fs.makedirs('/dir1')
with mem_fs.open('/dir1/file1', 'w') as file1:
file1.write('test')
I want to mount this filesystem onto a directory in my OS filesystem (e.g., /home/user/mem_dir). I can create an object that would reference OS filesystem:
os_fs = fs.open_fs('/home/user/mem_dir')
But then I have no idea how to go about mounting mem_fs onto os_fs. I tried using MountFS class, but it only creates a virtual filesystem. I need to create a mount point in a way that other external applications (e.g., nautilus) would be able to see it and copy files to/from there. Any feedback would be appreciated.