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

FXDirVisitor.h
1 /********************************************************************************
2 * *
3 * D i r e c t o r y V i s i t o r *
4 * *
5 *********************************************************************************
6 * Copyright (C) 2008,2026 by Jeroen van der Zijp. All Rights Reserved. *
7 *********************************************************************************
8 * This library is free software; you can redistribute it and/or modify *
9 * it under the terms of the GNU Lesser General Public License as published by *
10 * the Free Software Foundation; either version 3 of the License, or *
11 * (at your option) any later version. *
12 * *
13 * This library is distributed in the hope that it will be useful, *
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16 * GNU Lesser General Public License for more details. *
17 * *
18 * You should have received a copy of the GNU Lesser General Public License *
19 * along with this program. If not, see <http://www.gnu.org/licenses/> *
20 ********************************************************************************/
21 #ifndef FXDIRVISITOR_H
22 #define FXDIRVISITOR_H
23 
24 namespace FX {
25 
26 
57 class FXAPI FXDirVisitor {
58 private:
59  struct Seen;
60 private:
61  Seen* current;
62 private:
63  FXDirVisitor(const FXDirVisitor&);
64  FXDirVisitor& operator=(const FXDirVisitor&);
65 public:
66 
68  FXDirVisitor():current(nullptr){}
69 
71  FXuint traverse(const FXString& path,FXint limit=1000);
72 
74  FXbool visiting() const { return current!=nullptr; }
75 
77  const FXStat& info() const;
78 
80  virtual FXuint enter(const FXString& path);
81 
83  virtual FXuint visit(const FXString& path);
84 
86  virtual FXuint leave(const FXString& path);
87 
89  virtual ~FXDirVisitor();
90  };
91 
92 }
93 
94 #endif
Directory visitor walks across all files and directories recursively, starting from the given path...
Definition: FXDirVisitor.h:57
Statistics about a file or directory.
Definition: FXStat.h:31
FXDirVisitor()
Initialize directory visitor.
Definition: FXDirVisitor.h:68
Definition: FX4Splitter.h:28
FXbool visiting() const
Return true if we&#39;re actively visiting directories.
Definition: FXDirVisitor.h:74
FXString provides essential string manipulation capabilities in FOX.
Definition: FXString.h:42

Copyright © 1997-2026 Jeroen van der Zijp