Skip to content

fusebox: composable transformations on file systems, mounted with jfuse #131

Closed

Description

@nahoj

Hi, I wanted to share a project I recently wrote using jfuse!

The project is library that exposes an interface to apply one or more transformations on an existing filesystem, such as filtering files, renaming, making files read-only, etc., in the same style as Streams.

For example, here is JBang script that mounts a view of an existing directory where all Markdown files are transformed to HTML:

    FuseboxFS fs = LocalFS.at(args[0])
            .mapFiles(glob("**.md"), file ->  // Selecting all .md files
                    file.mapContent(content -> content.mapAsString(md ->
                            mdToHtml(file.name(), md)
                    ))
            )
            // Renaming needs to be defined both ways
            .mapNames(glob("**.md"), glob("**.html"),
                    name -> name.substring(0, name.length() - 3) + ".html",
                    name -> name.substring(0, name.length() - 5) + ".md"
            );
    Fusebox.mount("markdown_to_html", fs, args[1]);

I'd love to know what you think!

The link to the repo: https://github.com/nahoj/fusebox-fs

Activity

  1. locked and limited conversation to collaborators on Sep 9, 2025
  2. converted this issue into a discussion #133 on Sep 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions