CMake/Directory.hxx.in
KWSys Robot 72b5b48040 KWSys 2014-10-31 (88c8cc7f)
Extract upstream KWSys using the following shell commands.

$ git archive --prefix=upstream-kwsys/ 88c8cc7f | tar x
$ git shortlog --no-merges --abbrev=8 --format='%h %s' 29ffaf43..88c8cc7f
Ben Boeckel (11):
      9bf03363 Avoid if() quoted auto-dereference
      771e0f22 DynamicLoader: use strings for arguments
      86e20d68 Directory: remove extra define
      6cc24510 SystemTools: use strings in environment functions
      bab5b1f2 SystemTools: add string overload for ReplaceString
      f3fb01cf SystemTools: use strings for path-related APIs
      0dfbe56d SystemTools: use strings for making C identifiers
      4690fc8d SystemTools: use strings in registry function
      1b762a41 SystemTools: search for characters
      4a060347 SystemInformation: use %ls for WCHAR* format specifiers
      d31f7b12 SystemTools: remove unused variable

Brad King (1):
      88c8cc7f Fix configure_file call to use COPYONLY, not COPY_ONLY

Clinton Stimpson (1):
      5bf91dda SystemTools:  Use extended length path for copying files.

Change-Id: I16e8e55dea1c171c04f9c7d04ae3c575531097c3
2014-10-31 13:11:53 -04:00

92 lines
2.5 KiB
C++

/*============================================================================
KWSys - Kitware System Library
Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
Distributed under the OSI-approved BSD License (the "License");
see accompanying file Copyright.txt for details.
This software is distributed WITHOUT ANY WARRANTY; without even the
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the License for more information.
============================================================================*/
#ifndef @KWSYS_NAMESPACE@_Directory_hxx
#define @KWSYS_NAMESPACE@_Directory_hxx
#include <@KWSYS_NAMESPACE@/Configure.h>
#include <@KWSYS_NAMESPACE@/stl/string>
/* Define these macros temporarily to keep the code readable. */
#if !defined (KWSYS_NAMESPACE) && !@KWSYS_NAMESPACE@_NAME_IS_KWSYS
# define kwsys_stl @KWSYS_NAMESPACE@_stl
#endif
namespace @KWSYS_NAMESPACE@
{
class DirectoryInternals;
/** \class Directory
* \brief Portable directory/filename traversal.
*
* Directory provides a portable way of finding the names of the files
* in a system directory.
*
* Directory currently works with Windows and Unix operating systems.
*/
class @KWSYS_NAMESPACE@_EXPORT Directory
{
public:
Directory();
~Directory();
/**
* Load the specified directory and load the names of the files
* in that directory. 0 is returned if the directory can not be
* opened, 1 if it is opened.
*/
bool Load(const kwsys_stl::string&);
/**
* Return the number of files in the current directory.
*/
unsigned long GetNumberOfFiles() const;
/**
* Return the number of files in the specified directory.
* A higher performance static method.
*/
static unsigned long GetNumberOfFilesInDirectory(const kwsys_stl::string&);
/**
* Return the file at the given index, the indexing is 0 based
*/
const char* GetFile(unsigned long) const;
/**
* Return the path to Open'ed directory
*/
const char* GetPath() const;
/**
* Clear the internal structure. Used internally at beginning of Load(...)
* to clear the cache.
*/
void Clear();
private:
// Private implementation details.
DirectoryInternals* Internal;
Directory(const Directory&); // Not implemented.
void operator=(const Directory&); // Not implemented.
}; // End Class: Directory
} // namespace @KWSYS_NAMESPACE@
/* Undefine temporary macros. */
#if !defined (KWSYS_NAMESPACE) && !@KWSYS_NAMESPACE@_NAME_IS_KWSYS
# undef kwsys_stl
#endif
#endif