Resync
[CMakeLuaTailorHgBridge.git] / CMakeLua / Source / kwsys / Directory.hxx.in
blob0be75ef9ed7d3a08be5fd76464935cbd354fc4f6
1 /*=========================================================================
3 Program: KWSys - Kitware System Library
4 Module: $RCSfile: Directory.hxx.in,v $
6 Copyright (c) Kitware, Inc., Insight Consortium. All rights reserved.
7 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 This software is distributed WITHOUT ANY WARRANTY; without even
10 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11 PURPOSE. See the above copyright notices for more information.
13 =========================================================================*/
14 #ifndef @KWSYS_NAMESPACE@_Directory_hxx
15 #define @KWSYS_NAMESPACE@_Directory_hxx
17 #include <@KWSYS_NAMESPACE@/Configure.h>
19 namespace @KWSYS_NAMESPACE@
22 class DirectoryInternals;
24 /** \class Directory
25 * \brief Portable directory/filename traversal.
27 * Directory provides a portable way of finding the names of the files
28 * in a system directory.
30 * Directory currently works with Windows and Unix operating systems.
32 class @KWSYS_NAMESPACE@_EXPORT Directory
34 public:
35 Directory();
36 ~Directory();
38 /**
39 * Load the specified directory and load the names of the files
40 * in that directory. 0 is returned if the directory can not be
41 * opened, 1 if it is opened.
43 bool Load(const char*);
45 /**
46 * Return the number of files in the current directory.
48 unsigned long GetNumberOfFiles() const;
50 /**
51 * Return the number of files in the specified directory.
52 * A higher performance static method.
54 static unsigned long GetNumberOfFilesInDirectory(const char*);
56 /**
57 * Return the file at the given index, the indexing is 0 based
59 const char* GetFile(unsigned long) const;
61 /**
62 * Return the path to Open'ed directory
64 const char* GetPath() const;
66 /**
67 * Clear the internal structure. Used internally at beginning of Load(...)
68 * to clear the cache.
70 void Clear();
72 private:
73 // Private implementation details.
74 DirectoryInternals* Internal;
76 Directory(const Directory&); // Not implemented.
77 void operator=(const Directory&); // Not implemented.
78 }; // End Class: Directory
80 } // namespace @KWSYS_NAMESPACE@
82 #endif