Directory.hxx.in 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /*=========================================================================
  2. Program: KWSys - Kitware System Library
  3. Module: $RCSfile$
  4. Copyright (c) Kitware, Inc., Insight Consortium. All rights reserved.
  5. See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
  6. This software is distributed WITHOUT ANY WARRANTY; without even
  7. the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  8. PURPOSE. See the above copyright notices for more information.
  9. =========================================================================*/
  10. #ifndef @KWSYS_NAMESPACE@_Directory_hxx
  11. #define @KWSYS_NAMESPACE@_Directory_hxx
  12. #include <@KWSYS_NAMESPACE@/Configure.h>
  13. namespace @KWSYS_NAMESPACE@
  14. {
  15. class DirectoryInternals;
  16. /** \class Directory
  17. * \brief Portable directory/filename traversal.
  18. *
  19. * Directory provides a portable way of finding the names of the files
  20. * in a system directory.
  21. *
  22. * Directory currently works with Windows and Unix operating systems.
  23. */
  24. class @KWSYS_NAMESPACE@_EXPORT Directory
  25. {
  26. public:
  27. Directory();
  28. ~Directory();
  29. /**
  30. * Load the specified directory and load the names of the files
  31. * in that directory. 0 is returned if the directory can not be
  32. * opened, 1 if it is opened.
  33. */
  34. bool Load(const char*);
  35. /**
  36. * Return the number of files in the current directory.
  37. */
  38. unsigned long GetNumberOfFiles();
  39. /**
  40. * Return the file at the given index, the indexing is 0 based
  41. */
  42. const char* GetFile(unsigned long);
  43. private:
  44. // Private implementation details.
  45. DirectoryInternals* Internal;
  46. }; // End Class: Directory
  47. } // namespace @KWSYS_NAMESPACE@
  48. #endif