views:

102

answers:

4

I'm trying to write program to work as programmable directory, in other words: User, or other systems open that directory and read/write files or dirs. I try to create program to cache most used files in memory (less I/O to HDD), but right now I don't know how to achive that. There are probably some docs about this but I can't find them. I know that there is FUSE, NFS and others, but reading their source is quite difficult. If any one has info about implementation in C lang I'll be very grateful.

Sorry for my English..

A: 

If you want a simple implementation, try Python's FUSE library. A quick tutorial can be found here.

Marcelo Cantos
I agree FUSE is the way to proceed because what you are describing is creating your own type of file system.
Robert Menteer
But I need to create a compiled program so every python, ruby parts of code is not a solution for me.
Xam
+1  A: 

FUSE has a C interface - take a look at their Hello World example.

bdonlan
A: 

You could have a look at the GIO library — it's part of GTK, but can be used separately. The documentation is pretty thorough, and if you need to do some quick prototyping you can use the PyGTK GIO bindings to mess around before going back and writing it in C.

It's licensed under the LGPL.

detly
A: 

If you find it easier to code in Python, it's possible to create a compiled program using cx_Freeze.

bnery