filesystem within a file

F

Francois Fernandes

Hi list!

I would like to write a linux c++ program which mounts it's own filesystem
within a file, that is located in the Linux filesystem.
Now I don't know how to start that. I need basic help on how to write my
tool that I'm abel to create a File and "formating" this file, so that I
can place "files" in my filesystem in my file. Does anyone know where I
could get basic information about writing something like that? Or, maybe
how a filesystem is basically designed? Would be great.

thx
 
N

Noah Roberts

Francois said:
Hi list!

I would like to write a linux c++ program which mounts it's own
filesystem within a file, that is located in the Linux filesystem.
Now I don't know how to start that. I need basic help on how to write my
tool that I'm abel to create a File and "formating" this file, so that I
can place "files" in my filesystem in my file. Does anyone know where I
could get basic information about writing something like that? Or, maybe
how a filesystem is basically designed? Would be great.

thx

This is OT here unless you are asking how this would be done on any system.

On Linux you don't need to, use the loop device to mount a file and then
use it as a filesystem. "man mount"

The more std c++ way to answer the question is to tell you to research
how filesystems work and make one. I believe that at a basic level they
are b-trees which should be easily implemented using std c++.
www.tldp.org has books on the Linux kernel which may help you understand
how a filesystem works. You can also look at the source to Linux for
this information.

NR
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,143
Messages
2,570,822
Members
47,368
Latest member
michaelsmithh

Latest Threads

Top