By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,469 Members | 1,259 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,469 IT Pros & Developers. It's quick & easy.

filesystem within a file

P: n/a
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
Jul 19 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Francois Fernandes wrote:
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

Jul 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.