473,657 Members | 2,534 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

filesystem within a file

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
1 2565
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
5804
by: Peter Hansen | last post by:
The term "mock filesystem" refers to code allowing unit or acceptance tests to create, read and write, and manipulate in other ways "virtual" files, without any actual disk access. Everything is held in memory and therefore fast, without risk of damaging real files, and with none of the messiness of leftover files after testing. Googling the archives and the web suggests that only I and Remy Blank have done much along these lines. I...
6
4683
by: rbt | last post by:
More of an OS question than a Python question, but it is Python related so here goes: When I do os.walk('/') on a Linux computer, the entire file system is walked. On windows, however, I can only walk one drive at a time (C:\, D:\, etc.). Is there a way to make os.walk() behave on Windows as it behaves on Linux? I'd like to walk the entire file system at once... not one drive at a time. Thanks!
4
2539
by: Christian Blackburn | last post by:
Hi Gang, I've created a text-based file format. Once I've generated the text to save the file is as it should be in the debug window. However once I write it to a file a " is added to the beginning and a ", to the end. Can somebody explain why? I'm using VB2003. Thanks in advance for any help, Christian Blackburn Here's my code: Public Sub SaveGame(ByVal strDocument As String, Optional ByVal
2
2704
by: Jeff Davis | last post by:
I have virtual hosted users on a server and some of them have a postgresql database. I'm concerned about the outside possibility that a user could create an infinite loop and fill up the partition on which everyone's database resides. Anyway, it occured to me that I could create a special file for each database user of limited size, and make a filesystem on top of that file. The file could be owned by the user. Then, each user could have...
4
388
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How can I access the client-side filesystem? ----------------------------------------------------------------------- Security means that by default you can't. In a more restricted enviroment, there are options. For example, using LiveConnect to connect to Java with Netscape, and using the FileSystemObject in IE. Check http://groups.google.com/
12
2244
by: =?Utf-8?B?R2VyaGFyZA==?= | last post by:
I am using .Net 2.0, writing a directory on a network share using My.Computer.FileSystem.CreateDirectory. This works fine as long a USERS have full share permissions on that directory. My administrator has been unable to figure out which account to grant permissions to so that we can lock down the security and not allow everyone access. Can you please tell me which account .net uses for My.Computer.FileSystem Create Directory and writing...
2
4576
by: Javier | last post by:
Hello all, I'm trying to remove a hidden file (in UNIX) using the Boost::filesystem library. This is what I have: #include <boost/filesystem/operations.hpp> namespace fs=boost::filesystem;
1
3026
by: Thomas W | last post by:
I want to create a virtual filesystem based on a relational database. It might run as a server on a different machine, but it has to be available like a normal filesystem, either shared using SAMBA or windows filesharing or thru something else like WebDav. The idea is that I scan a local filesystem and then create relations between those files stored in a relational database, eg. a create a group called family, add a bunch of files...
3
1318
by: Patient Guy | last post by:
I am curious as to the strategy experienced scripters use when trying to interface with the filesystem through the web document. This for scripters who try to write web documents acting as applications (HTA?) which are opened on the localhost, and so there is no question regarding security here once the user accepts that the downloaded document represents no threat. For instance, some scripters are used to Unix style function calls...
0
8420
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8324
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8842
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8740
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8516
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6176
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5642
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2743
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1970
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.