Directory.hxx.in 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /*=========================================================================
  2. Program: KWSys - Kitware System Library
  3. Module: $RCSfile$
  4. Language: C++
  5. Date: $Date$
  6. Version: $Revision$
  7. Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
  8. See http://www.cmake.org/HTML/Copyright.html 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.
  12. =========================================================================*/
  13. #ifndef @KWSYS_NAMESPACE@_Directory_hxx
  14. #define @KWSYS_NAMESPACE@_Directory_hxx
  15. #include <@KWSYS_NAMESPACE@/Configure.h>
  16. namespace @KWSYS_NAMESPACE@
  17. {
  18. class DirectoryInternals;
  19. /** \class Directory
  20. * \brief Portable directory/filename traversal.
  21. *
  22. * Directory provides a portable way of finding the names of the files
  23. * in a system directory.
  24. *
  25. * Directory currently works with Windows and Unix operating systems.
  26. */
  27. class @KWSYS_NAMESPACE@_EXPORT Directory
  28. {
  29. public:
  30. Directory();
  31. ~Directory();
  32. /**
  33. * Load the specified directory and load the names of the files
  34. * in that directory. 0 is returned if the directory can not be
  35. * opened, 1 if it is opened.
  36. */
  37. bool Load(const char*);
  38. /**
  39. * Return the number of files in the current directory.
  40. */
  41. unsigned long GetNumberOfFiles();
  42. /**
  43. * Return the file at the given index, the indexing is 0 based
  44. */
  45. const char* GetFile(unsigned long);
  46. private:
  47. // Private implementation details.
  48. DirectoryInternals* Internal;
  49. }; // End Class: Directory
  50. } // namespace @KWSYS_NAMESPACE@
  51. #endif