1 // -*- mode: cpp; mode: fold -*-
3 // $Id: genfilelist.h,v 1.5 1999/12/26 06:59:01 jgg Exp $
4 /* ######################################################################
8 This class is responsible for generating the file list. It is fairly
9 simple and direct. One hook is provided to allow a derived class to
12 The file list format is documented in the filelist.sgml document.
14 ##################################################################### */
16 #ifndef DSYNC_GENFILELIST
17 #define DSYNC_GENFILELIST
20 #pragma interface "dsync/genfilelist.h"
23 #include <dsync/filefilter.h>
24 #include <dsync/filelist.h>
32 list<string> DelayQueue;
36 virtual int Visit(const char *Directory,const char *File,
37 struct stat const &Stat) {return 0;};
40 bool DirDepthFirst(char *CurDir);
44 bool EnterDir(const char *Dir,struct stat const &St);
45 bool LeaveDir(const char *Dir);
46 bool DirectoryMarker(const char *Dir,struct stat const &St);
47 bool DoFile(const char *Dir,const char *File,struct stat const &St);
49 bool EmitOwner(struct stat const &St,unsigned long &UID,
50 unsigned long &GID,unsigned int Tag,unsigned int Flag);
51 virtual bool EmitMD5(const char *Dir,const char *File,
52 struct stat const &St,unsigned char MD5[16],
53 unsigned int Tag,unsigned int Flag);
55 virtual bool NeedsRSync(const char *Dir,const char *File,
56 dsFList::NormalFile &F) {return false;};
57 virtual bool EmitRSync(const char *Dir,const char *File,
58 struct stat const &St,dsFList::NormalFile &F,
59 dsFList::RSyncChecksum &Ck);
63 // Configurable things
64 enum {Depth,Breadth,Tree} Type;
66 dsFileFilter PreferFilter;
68 bool Go(string Base,dsFList::IO &IO);
71 virtual ~dsGenFileList();