The circle got a a starting point on by having the 'file' index always start in block 2. Leaving block 1 for the header. Now the 'file' index can be used to retrieve meta data and data tables and data indexes also stored as other files inside the chunked file. The 'file' index can be considered an data table also.Originally Posted by chronozphere
Have a look at my vfs: http://www.noeska.net/projects/nvfs/
and look at
procedure TVirtualFileSystem.GetFileList(aname: string; List: TStrings);
that uses FDir: TVirtualFileStream;
what is a filestream inside the chunked file that starts in block2.
it can be loaded in a stream by name '/' because
function TVirtualFileSystem.FindFile(aname: string; var afilerecord: TFileInfo): int64;
returns the first record in block 1:
self.ReadBlock(1,FileRecordEntry,0,SizeOf(TFileInf o));
and yes this record is fixed size :-) variable sized records are somewhere low on my todo list.
as filename: string[255];
and yes nvfs potentialy needs to be defragmented after deleting files and making files larger/smaller.
But i have no need to enumerate al files at startup. Al i need to do when reading a file is look up its name in '/' that way i retrieve the starting chunk and each chunk knows the follow up chunk for a file.
Bookmarks