1 // -*- mode: cpp; mode: fold -*-
3 // $Id: filelistdb.h,v 1.2 1999/01/10 07:34:05 jgg Exp $
4 /* ######################################################################
8 This scans a file list and generates a searchable list of all
9 directories in the list. It can then do a lookup of a given file,
12 The memory mapped IO class is recommended for use with the DB class
15 ##################################################################### */
17 #ifndef DSYNC_FILELISTDB
18 #define DSYNC_FILELISTDB
21 #pragma interface "dsync/filelistdb.h"
24 #include <dsync/filelist.h>
25 #include <dsync/mmap.h>
37 map<string,Location> Map;
41 bool Generate(dsFList::IO &IO);
42 bool Lookup(dsFList::IO &IO,const char *Dir,const char *File,dsFList &List);
47 class dsMMapIO : public dsFList::IO
55 virtual bool Read(void *Buf,unsigned long Len);
56 virtual bool Write(const void *Buf,unsigned long Len);
57 virtual bool Seek(unsigned long Bytes);
58 virtual unsigned long Tell();
60 dsMMapIO(string File);