How to use the pyfuse3.FileInfo function in pyfuse3

To help you get started, we’ve selected a few pyfuse3 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pcgrosen / bashfs / bashfs / bashfs.py View on Github external
async def open(self, inode, flags, ctx):
        path = self._get_node(inode).make_path(self.separator)
        l.debug("open: %r", path)
        file_handle = next(self._file_generator)
        proc = await trio.open_process(self.argv_prefix + [path.decode()],
                                       stdout=subprocess.PIPE,
                                       stdin=subprocess.PIPE)
        self._proc_map[file_handle] = proc
        return pyfuse3.FileInfo(fh=file_handle, direct_io=True,
                                keep_cache=False, nonseekable=True)