Example #1
0
    def run_fuse_mount(self):
        self.mountdir = tempfile.mkdtemp()

        self.operations = Operations(os.getuid(), os.getgid(), "utf-8")
        self.cdir = CollectionDirectory(llfuse.ROOT_INODE, self.operations.inodes, self.api, 2, self.collection)
        self.operations.inodes.add_entry(self.cdir)

        # Initialize the fuse connection
        llfuse.init(self.operations, self.mountdir, ['allow_other'])

        t = threading.Thread(None, llfuse.main)
        t.start()

        # wait until the driver is finished initializing
        self.operations.initlock.wait()