How to use the pyfuse3.default_options 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 / __main__.py View on Github external
def main():
    logging.basicConfig()
    args = parse_args()
    if args.debug:
        logging.getLogger().setLevel(logging.DEBUG)

    argv = args.argv_prefix if args.argv_prefix else ("bash", "-c")
    operations = BashFS(argv_prefix=argv, separator=args.separator.encode())

    fuse_options = set(pyfuse3.default_options)
    fuse_options.add("fsname=bashfs")
    fuse_options.discard("default_permissions")
    if args.debug_fuse:
        fuse_options.add("debug")
    pyfuse3.init(operations, args.mountpoint, fuse_options)

    try:
        trio.run(pyfuse3.main)
    except:
        pyfuse3.close(unmount=True)
        raise

    pyfuse3.close()