-
-
Notifications
You must be signed in to change notification settings - Fork 5
fusebox: composable transformations on file systems, mounted with jfuse #133
-
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
Beta Was this translation helpful? Give feedback.
All reactions
-
🚀 1
Replies: 1 comment
-
@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.
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1