Creating a virtual file system

A

Atila Olah

I'm working on a project to implement a simple cross-platform file
sharing protocol (using Python) that is similar to HTTP, and I have to
write a GUI for Windows and Linux. But let's start with the harder one:
Windows.

My question is: How do I implement a virtual partition that acts like a
real file-system and is compleatly transparent to other programs?
Should I make a virtual file allocation table for a FAT32 partition or
simulate an NTFS? Or even further: How do I create a junction (or a
hard link) to it in "My network places" or in "Entire Network"?

If there are tools that could help me but written in C or C++, please
let me know, I'll compile them to Python modules.

Thanks forward for help.
 
J

Jorgen Grahn

I'm working on a project to implement a simple cross-platform file
sharing protocol (using Python) that is similar to HTTP, and I have to

Like WebDAV, then?
My question is: How do I implement a virtual partition that acts like a
real file-system and is compleatly transparent to other programs?
Should I make a virtual file allocation table for a FAT32 partition or
simulate an NTFS? Or even further: How do I create a junction (or a
hard link) to it in "My network places" or in "Entire Network"?

You're asking in the wrong group completely. What you are trying to do is to
extend the Windows kernel. This is almost certainly a difficult and
dangerous task, and it will require C or C++ programming against Windows
APIs that may or may not be available to mere mortals.

On the other hand, if you can get such a thing to work, it would be very fun
and useful.

It's easier on Linux, but probably not /easy/. Google for "user space file
system" and "webdav file system".

Also note that this has nothing to do with FAT32 or NTFS. Those describe two
different physical layouts of bits on a disk, and there's a driver for each
that expose them to the kernel as a set of read/write/list directory calls.
Your file system driver will have to expose the same calls, but implement
them in a completely different way that has nothing to do with bits on a
disk.

/Jorgen
 
J

Jeff Schwab

Atila said:
I'm working on a project to implement a simple cross-platform file
sharing protocol (using Python) that is similar to HTTP, and I have to
write a GUI for Windows and Linux. But let's start with the harder one:
Windows.

My question is: How do I implement a virtual partition that acts like a
real file-system and is compleatly transparent to other programs?
Should I make a virtual file allocation table for a FAT32 partition or
simulate an NTFS? Or even further: How do I create a junction (or a
hard link) to it in "My network places" or in "Entire Network"?

If there are tools that could help me but written in C or C++, please
let me know, I'll compile them to Python modules.

Thanks forward for help.

http://www.samba.org/samba/what_is_samba.html
 
B

Bryan Olson

Atila said:
> My question is: How do I implement a virtual partition that acts like a
> real file-system and is compleatly transparent to other programs?
> Should I make a virtual file allocation table for a FAT32 partition or
> simulate an NTFS? Or even further: How do I create a junction (or a
> hard link) to it in "My network places" or in "Entire Network"?

Hmmm... I seem to rememeber ... Ah, here...

On:

http://ask.slashdot.org/article.pl?sid=04/06/01/1810201

'Petard' and 'Foolhard' note that the Microsoft Windows IFS
(Installable File System) Developer's Kit costs like $900. Doing
it well would be a large and expensive project. Read their posts
for more discouragement.

> Thanks forward for help.

Not exactly helpful was I? Sorry.
 
J

Jeff Schwab

Bryan said:
Hmmm... I seem to rememeber ... Ah, here...

On:

http://ask.slashdot.org/article.pl?sid=04/06/01/1810201

'Petard' and 'Foolhard' note that the Microsoft Windows IFS
(Installable File System) Developer's Kit costs like $900. Doing
it well would be a large and expensive project. Read their posts
for more discouragement.



Not exactly helpful was I? Sorry.

You don't have to pay Microsoft to develop a Windows-compatible
filesystem. See http://ubiqx.org/cifs/.
 
J

Jeff Schwab

Bryan said:
That's a different usage of "filesystem" than what is at issue
here.

I agree that you & I are probably discussing different things, but I
think this is exactly what the OP was seeking. He said:
> I'm working on a project to implement a simple cross-platform file
> sharing protocol (using Python) that is similar to HTTP, and I
> have to write a GUI for Windows and Linux.

Sure sounds like CIFS to me.
> My question is: How do I implement a virtual partition that acts
> like a real file-system and is compleatly transparent to other
> programs? Should I make a virtual file allocation table for a
> FAT32 partition or simulate an NTFS? Or even further: How do I
> create a junction (or a hard link) to it in "My network places" or
> in "Entire Network"?

CIFS is the canonical way to make resources show up in Network
Neighborhood. The OP even said:
> If there are tools that could help me but written in C or C++,
> please let me know, I'll compile them to Python modules.

Free, open source CIFS implementations already exist in C and Java.

I'm guessing that to you (as to many of us) a filesystem is usually a
way of mapping blocks on a device to parts of files, but I don't think
that's what the OP actually wanted.
 
B

Bryan Olson

Jeff said:
> I agree that you & I are probably discussing different things, but I
> think this is exactly what the OP was seeking. He said:
>
> > I'm working on a project to implement a simple cross-platform file
> > sharing protocol (using Python) that is similar to HTTP, and I
> > have to write a GUI for Windows and Linux.
>
> Sure sounds like CIFS to me.
>
> > My question is: How do I implement a virtual partition that acts
> > like a real file-system and is compleatly transparent to other
> > programs? Should I make a virtual file allocation table for a
> > FAT32 partition or simulate an NTFS? Or even further: How do I
> > create a junction (or a hard link) to it in "My network places" or
> > in "Entire Network"?
>
> CIFS is the canonical way to make resources show up in Network
> Neighborhood. [...]

Hmmm, you have a point. Looks like he has elements of both local
file systems and networking protocols. To make his special
filesystem transparent to MS-Windows programs is an installable-
filesystem problem, which is what I was looking at.
 

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
473,780
Messages
2,569,611
Members
45,281
Latest member
Pedroaciny

Latest Threads

Top