jonpryor / mono-fuse Goto Github PK
View Code? Open in Web Editor NEWBindings for the FUSE FileSystem in User Space library for use in managed code
Home Page: http://www.jprl.com/Projects/mono-fuse/
License: MIT License
Bindings for the FUSE FileSystem in User Space library for use in managed code
Home Page: http://www.jprl.com/Projects/mono-fuse/
License: MIT License
This is a Mono/.NET binding for FUSE. Short HOWTO: Within one terminal: sudo /sbin/modprobe fuse # need FUSE kernel module to use. ./configure make cd example/HelloFS mkdir t ./hellofs t Within another terminal cd example/HelloFS ls t cat t/hello This should display files controlled by HelloFS.exe. To unmount the filesystem, you need to use the `fusermount' program: cd example/HelloFS fusermount -u t KILLING THE FUSE PROGRAM IS NOT ENOUGH. The program will die, but FUSE and the kernel will still think that the directory is mounted. Result: you can't remount the directory, and trying to do anything with it will result in IO errors. For full trace output, set the MONO_TRACE_LISTENER environment variable and add the -odebug command-line argument: cd example/HelloFS MONO_TRACE_LISTENER=Console.Out### ./hellofs -odebug t MONO_TRACE_LISTENER controls the Mono.Fuse trace output, while -odebug controls the libfuse-generated trace output. `hellofs' also takes its own command-line aruments. By default, it exports two files, `data' and `hello'. `hello' contains the string "Hello World!", while `data' is a 100 MB (base 10) file that generates its content on-demand. If you pass the --data.im-in-memory flag, a `data.im' file will be available which is a 100MB (base 10) file with the same contents as `data', but it is backed by a 100MB byte[] instead of generating its contents on demand: cd example/HelloFS ./hellofs --data.im-in-memory t The 100MB byte[] is allocated the first time the contents of `data.im' are read. `data.im' is useful to see the difference in performance between generate-on-demand and cached behaviors: cd example/HelloFS ./hellofs --data.im-in-memory t # On-demand copy time cp t/data f.txt real 0m8.469s user 0m0.020s sys 0m1.128s # In-memory copy # Note that the first `data.im' access is longer # because it needed to allocate the array. # Subsequent calls are shorter: time \cp -f t/data.im f.txt real 0m12.393s user 0m0.004s sys 0m1.172s time \cp -f t/data.im f.txt real 0m5.233s user 0m0.016s sys 0m1.136s # And for comparison, cp without FUSE: time cp f.txt f2.txt real 0m10.252s user 0m0.016s sys 0m1.000s And yes, on my machine it's faster to go through FUSE than to go through the filesystem (though usually the filesystem outperforms the on-demand generation). My machine is probably misconfigured. :-/ Your mileage will vary.
$ ./hellofs
Unhandled Exception:
System.InvalidOperationException: MountPoint must not be null
at Mono.Fuse.FileSystem.Start () [0x00099] in /home/alexrp/Projects/mono-fuse/src/Mono.Fuse/Mono.Fuse/FileSystem.cs:754
at Mono.Fuse.Samples.HelloFS.Main (System.String[] args) [0x00076] in /home/alexrp/Projects/mono-fuse/example/HelloFS/HelloFS.cs:266
[ERROR] FATAL UNHANDLED EXCEPTION: System.InvalidOperationException: MountPoint must not be null
at Mono.Fuse.FileSystem.Start () [0x00099] in /home/alexrp/Projects/mono-fuse/src/Mono.Fuse/Mono.Fuse/FileSystem.cs:754
at Mono.Fuse.Samples.HelloFS.Main (System.String[] args) [0x00076] in /home/alexrp/Projects/mono-fuse/example/HelloFS/HelloFS.cs:266
It works kind-of fine, but for making it work efficiently when reading/writing into a RDBMS-dababase and/or mongoDB, it should bind the low-level API where I could use the INODE as uid, instead of concatenated paths which need to be computed at search-time, or stored which violates the non-redundancy rule.
More like jLowFuse
https://github.com/irq0/jlowfuse
or
https://github.com/vgough/go-fuse-c
With paths, it is kinda slow and hard to maintain ...
Also, waiting for .NET Core version.
Hi
Can you please upload mono-fuse to nuget?
Thanks for your attention
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.