开发者

unmount fuse fs from python script

I have developed fuse fs with python and now want to write tests for it. Before testing I mount fs to som开发者_JAVA百科e dir:


    fs = MyFuseFS()
    fs.parse(errex=1, ['some_dir'])
    fs.main()

After testing I want unmount my fs, want to do something like this:


fs.unmount()

Is it something like "unmount" method? Maybe there is another ways to unmount fs?


http://packages.python.org/fs/expose/fuse.html

you can see what you need from this link.

>>> from fs.memoryfs import MemoryFS
>>> from fs.expose import fuse
>>> fs = MemoryFS()
>>> mp = fuse.mount(fs,"/mnt/my-memory-fs")
>>> mp.unmount()

you guessed the function name right :)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜