Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

nahoj started this conversation in Show and tell
Discussion options

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

You must be logged in to vote

Replies: 1 comment

Comment options

@nahoj Thanks for sharing! We are happy that the project is used by others. 💯

Remark: The original ticket got closed, because I moved your post to the disscussion section of the project.

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #131 on September 09, 2025 10:40.

AltStyle によって変換されたページ (->オリジナル) /