FsGateway is a Mono application that allow to mount several entity as a filesystem.
To do this one mono-fuse is used. Actually when you need to start the fsgateway you need do specify the filesystem type and the mountpoint.
Now will describe the use of xmlfs "module".
This module allow to mount a XML file into the normal filesystem. To do this simply run the application specify filesystem type (xmlfs), an XML file (in this case ~/mono_sugar/xml/xml/xml/bin/Debug/test3.xml) and the mountpoint (in this case mountpoint/):
mono fsgateway.exe xmlfs ~/mono_sugar/xml/xml/xml/bin/Debug/test3.xml mountpoint/
Now you can use your preferred file manager like nautilus or dolphin to see the content and open each node like a file:
If you run the "find" or "grep" utilities, the file name that you get contains the XPath query to access the node. For example:
find mountpoint -iname "*md5*"
give this result for the file that I specify:
mountpoint/def:metadigit/def:img[1]/def:md5
mountpoint/def:metadigit/def:img[1]/def:altimg[1]/def:md5
mountpoint/def:metadigit/def:img[1]/def:altimg[2]/def:md5
mountpoint/def:metadigit/def:img[2]/def:md5
mountpoint/def:metadigit/def:img[2]/def:altimg[1]/def:md5
mountpoint/def:metadigit/def:img[2]/def:altimg[2]/def:md5
mountpoint/def:metadigit/def:img[3]/def:md5
mountpoint/def:metadigit/def:img[3]/def:altimg[1]/def:md5
mountpoint/def:metadigit/def:img[3]/def:altimg[2]/def:md5
mountpoint/def:metadigit/def:img[4]/def:md5
mountpoint/def:metadigit/def:img[4]/def:altimg[1]/def:md5
mountpoint/def:metadigit/def:img[4]/def:altimg[2]/def:md5
mountpoint/def:metadigit/def:img[5]/def:md5
mountpoint/def:metadigit/def:img[5]/def:altimg[1]/def:md5
mountpoint/def:metadigit/def:img[5]/def:altimg[2]/def:md5
mountpoint/def:metadigit/def:img[6]/def:md5
mountpoint/def:metadigit/def:img[6]/def:altimg[1]/def:md5
mountpoint/def:metadigit/def:img[6]/def:altimg[2]/def:md5
mountpoint/def:metadigit/def:img[7]/def:md5
mountpoint/def:metadigit/def:img[7]/def:altimg[1]/def:md5
mountpoint/def:metadigit/def:img[7]/def:altimg[2]/def:md5
mountpoint/def:metadigit/def:img[8]/def:md5
mountpoint/def:metadigit/def:img[8]/def:altimg[1]/def:md5
mountpoint/def:metadigit/def:img[8]/def:altimg[2]/def:md5
The same way, if you run "grep" you get the same behavior. For example:
grep -ril piccolo mountpoint/
gives as result:
mountpoint/def:metadigit/def:bib/dc:description/text()
You can find the source code
here.
Note: the def prefix is automatically added by the module for the default namespace. If this prefix is already used, the module use def2, or def3 ... and so on.
3 commenti:
nice. will be giving this thing a roll for fun!
can't build it. (auto)configure does nothing (little)? Monodevelop project needs Mono.Fuse.dll.
git clone http://www.jprl.com/Projects/mono-fuse.git
cd mono-fuse
./autogen.sh
make -j1
[error, remove .mdb references in Makefile.am]
make -j1
[weird sharing violations]
make -j1
[libtool: install:
'libMonoFuseHelper.la' is not a valid libtool archive]
make -j1 # ? plretty please
[give up]
Ambert, on some distro I see that there is some problem on mono-fuse, and compile it from source seems do not install well. So can you try to modify the makefile of fsgateway to use the compiled mono-fuse direclty?
Posta un commento