You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fusebox: composable transformations on file systems, mounted with jfuse #131
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:
FuseboxFSfs = LocalFS.at(args[0])
.mapFiles(glob("**.md"), file -> // Selecting all .md filesfile.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]);
Activity