Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members

FXDirVisitor.h

Go to the documentation of this file.
00001 /********************************************************************************
00002 *                                                                               *
00003 *                     D i r e c t o r y   V i s i t o r                         *
00004 *                                                                               *
00005 *********************************************************************************
00006 * Copyright (C) 2008,2009 by Jeroen van der Zijp.   All Rights Reserved.        *
00007 *********************************************************************************
00008 * This library is free software; you can redistribute it and/or modify          *
00009 * it under the terms of the GNU Lesser General Public License as published by   *
00010 * the Free Software Foundation; either version 3 of the License, or             *
00011 * (at your option) any later version.                                           *
00012 *                                                                               *
00013 * This library is distributed in the hope that it will be useful,               *
00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of                *
00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                 *
00016 * GNU Lesser General Public License for more details.                           *
00017 *                                                                               *
00018 * You should have received a copy of the GNU Lesser General Public License      *
00019 * along with this program.  If not, see <http://www.gnu.org/licenses/>          *
00020 *********************************************************************************
00021 * $Id: FXDirVisitor.h,v 1.4 2009/01/06 13:07:23 fox Exp $                       *
00022 ********************************************************************************/
00023 #ifndef FXDIRVISITOR_H
00024 #define FXDIRVISITOR_H
00025 
00026 namespace FX {
00027 
00028 
00029 /**
00030 * Directory visitor frequents all files and directories
00031 * recursively, calling visit() for every file, and enter()/leave()
00032 * for every directory.
00033 */
00034 class FXAPI FXDirVisitor {
00035 private:
00036   struct Seen;
00037 private:
00038   FXuint recurse(const FXString& path,Seen *seen);
00039 public:
00040   FXuint traverse(const FXString& path);
00041   virtual FXuint enter(const FXString& path);
00042   virtual FXuint visit(const FXString& path);
00043   virtual FXuint leave(const FXString& path);
00044   virtual ~FXDirVisitor(){}
00045   };
00046 
00047 
00048 
00049 }
00050 
00051 #endif

Copyright © 1997-2009 Jeroen van der Zijp