Has anyone ever attempted to create a VFS in VB?
I'm doing some research before i'm starting to develop my own VFS for a project i'm busy with.
(Tried searching but no to avail)
Printable View
Has anyone ever attempted to create a VFS in VB?
I'm doing some research before i'm starting to develop my own VFS for a project i'm busy with.
(Tried searching but no to avail)
is it another file system layer on top of another file system?
Basically I would like to have a VFS like a zip file structure.
<root>
|
\-- Dir
\-- Dir\dir2
\-- Dir\file
\-- Dir\file2
\-- Dir\file3
With basic functions like search file. basically there should be 2 ways to fetch files, either streaming or by extracting it.
That's it :)
Perhaps u could tell sumthin' about ur project so we could have a
picture of wut u r goin' 2 do and so we could help u wif it, besides
letting us understand better of the VFS u need.
BTW, the way u describe ur VFS is like designing a file
format. Is that wut u want? A file format is not a VFS.
The best example I can give is Quake 3's VFS which is completely based upon a ZIP file.
What I'm busy with is a game, and I dont want thousands of files littering directories. 2 or 1 Data file is all that I want.
But it needs to manageable ie. Like zip..
Now you might be wondering why I dont just use Zip files for VFS.. well simple reason: it costs money (License), I want it to be free of any license and preferably open source so that I can later on post the VFS Core modules here :)
So to sum up what I think a VFS should be:
- A filesystem format based in 1 file (like Zip, Iso, Bin, etc)
- Easy fetching of files by streaming it or extracting it
- Quick add, delete or modify. (for the VFS Manager utility)
- Compression per file or complete compression of the VFS.
So if no'one ever tried this before in VB and wants to help, yell :)
after all a VFS is also a kind of file format, only that
it's far more advance and complex as well.
Now I know wut u mean. Another example is Doom II's
WAD file, rite? Where it stores all the sprites and map data.
VB has performance and speed issues. Don't ever do things like
VFS in VB. It's just so slow that get you discoraged.
Nevertheless, there're some sort of techniques out there to solve
this speed problem.
Let me give u some hints: ur VFS could've a header, table
and data chunks and pointers.
The fixed length header will tell u everything including size about
every component in your VFS. The next one would be a
table, having names and pointers to spesific stuffs. So when u
look up stuffs, u just look at this table. When u want something or
delete something, get the pointer and acquire the data or simply
discard that pointer.
After all, this is just my idea. It might not work very well:rolleyes:
Basically at runtime it generates a look up index where files are in the file.
Most routines wont be in VB but will be written in C++, as indeed this is a matter of speed and performance.
But the first prototype I want to create will be in VB to test it.
Though I've found an old Q2 PAK class I've written a long time and who knows, I might just modify that and use it ;)
-additional stuff-
WAD files aren't good examples.. They store everything in the root, I want to use directories.. /maps /data /sound /textures/ etc.
uhh...store as directory structures...that's hard
look up for open source VFS
Actually I've done it in a Php/Mysql environment.. but it was only for 'viewers' that they thought it was in directories..
Basically, every file had a ParentDirID and there was a table that contained all the dirs..
:)
well u need sum ppl 2 work on this together, rite?
my knowledge of VFS ain't very good. But if u need lots of
ppl 2 work on it u can goto the Project forum under vbforums.
Might as well first figure out what I want ;-)