Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

mdirscanner.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                           mdirscanner.h  -  description
00003                              -------------------
00004     begin                : Tue Jan 27 2004
00005     copyright            : (C) 2004 by Mickael Faivre-Macon
00006     email                : mickael@easyplay.com.tw
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #ifndef MDIRSCANNER_H
00019 #define MDIRSCANNER_H
00020 
00021 #include <string>
00022 #include <vector>
00023 
00027 class MDirScanner {
00028 public: 
00029    //-----------
00030    struct MEntry {
00031       //MEntry() : Size(0) {}
00032       std::string Path, Name;
00033       int         Type;
00034       //unsigned long Size;
00035       };
00036 
00037    //-----------
00038    struct MOptions {
00039       MOptions() : Relative(true), IncludeDots(false), IncludeHidden(false),
00040          Depth(0), IncludeFiles(true), IncludeDirs(true), Sep("/") {}
00047       bool Relative, IncludeDots, IncludeHidden;
00048       bool IncludeFiles, IncludeDirs;
00049       int Depth;
00050       std::string Sep;
00051       } Options;
00052             
00053    typedef std::vector<MEntry> MList;
00054    typedef MList::iterator MListIte;
00055 
00056    MList List;
00057 
00058    MDirScanner();
00059    ~MDirScanner();
00060 
00061    void Scan(const std::string& dir);
00062    
00063 private:
00064    void Scan(const std::string& dir, const std::string& base, int depth);
00065 
00066 };
00067 
00068 #endif



MDFS SourceForge project page and download

SourceForge.net Logo

Generated on Sat Jan 3 03:14:20 2004 for MDFS by doxygen1.3.5