Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

dox/Common/vtkDirectory.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkDirectory.h,v $ 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00028 #ifndef __vtkDirectory_h 00029 #define __vtkDirectory_h 00030 00031 #include "vtkObject.h" 00032 00033 class VTK_COMMON_EXPORT vtkDirectory : public vtkObject 00034 { 00035 public: 00037 00038 vtkTypeRevisionMacro(vtkDirectory,vtkObject); 00040 00042 static vtkDirectory *New(); 00043 00045 virtual void PrintSelf(ostream& os, vtkIndent indent); 00046 00050 int Open(const char* dir); 00051 00053 int GetNumberOfFiles() { return this->NumberOfFiles; } 00054 00056 const char* GetFile(int index); 00057 00059 static const char* GetCurrentWorkingDirectory(char* buf, unsigned int len); 00060 00063 static int CreateDirectory(const char* dir); 00064 00065 protected: 00066 // delete the Files and Path ivars and set 00067 // NumberOfFiles to 0 00068 void CleanUpFilesAndPath(); 00069 vtkDirectory(); 00070 ~vtkDirectory() ; 00071 private: 00072 char* Path; // Path to Open'ed directory 00073 char** Files; // Array of Files 00074 int NumberOfFiles; // Number if files in open directory 00075 00076 private: 00077 vtkDirectory(const vtkDirectory&); // Not implemented. 00078 void operator=(const vtkDirectory&); // Not implemented. 00079 }; 00080 00081 #endif