Quote:Original post by Eps
Well, it should certainly work, but you may have over complicated things a bit. I'd have to mull over the details of you design to discover any pros/cons, so instead I'll show you what I came up with and you can compare it for yourself.// Pack Entrystruct PackEntry_T{ PackEntry_T() { memset(this, 0, sizeof(PackEntry_T)); } short type; // Type of entry: Folder(0) or File(1). unsigned char string[54]; // Name of the entry, 52 chars, padded with '\0'. long size; // Uncompressed size of the entry in PACK file if a file, or number of entries if a folder. long csize; // Compressed size of the file.};
Would yours be as efficient for navigating throu multiple directories? (not that mine can anyhow)? It seems like you would have to parse through a large amount of data to get to a file thats a few folders down the tree. I'm actually getting very interested in this project now, I never thought I'd find myself doing filesystem design, no matter how elementary!
Quote:
Your structs are 4 byte aligned which is good, if they weren't they would get padded by the default compiler options (in VS anyhow) and when trying to parse the file by the size of structs you'd run into problems.
I didn't even think of that so it's purely coincidental. Is there a precompiler directive that turns this off?
Quote:Original post by Eps
Couldn't find this feature for reiser in just a couple min of searching, but I'm on a windows box anyhow. Any idea if there is a similar feature available (whatever it does?)
I don't think NTFS has this feature. From what I've read about resier4 it's meant to be the bees knees of FS', I have no idea how true that is though!