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

# Common/vtkDirectory.h

Go to the documentation of this file.

    00001 /*=========================================================================
    00002
    00003   Program:   Visualization Toolkit
    00004   Module:    $RCSfile: vtkDirectory.h,v $
    00005   Language:  C++
    00006
    00007   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen
    00008   All rights reserved.
    00009   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
    00010
    00011      This software is distributed WITHOUT ANY WARRANTY; without even
    00012      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
    00013      PURPOSE.  See the above copyright notice for more information.
    00014
    00015 =========================================================================*/
    00045 #ifndef __vtkDirectory_h
    00046 #define __vtkDirectory_h
    00047
    00048 #include "vtkObject.h"
    00049
    00050 class VTK_COMMON_EXPORT vtkDirectory : public vtkObject
    00051 {
    00052 public:
    00054
    00055   vtkTypeRevisionMacro(vtkDirectory,vtkObject);
    00057
    00059   static vtkDirectory *New();
    00060
    00062   virtual void PrintSelf(ostream& os, vtkIndent indent);
    00063
    00067   int Open(const char* dir);
    00068
    00070   int GetNumberOfFiles() { return this->NumberOfFiles; }
    00071
    00073   const char* GetFile(int index);
    00074
    00076   static const char* GetCurrentWorkingDirectory(char* buf, unsigned int len);
    00077
    00080   static int CreateDirectory(const char* dir);
    00081
    00082 protected:
    00083   // delete the Files and Path ivars and set
    00084   // NumberOfFiles to 0
    00085   void CleanUpFilesAndPath();
    00086   vtkDirectory();
    00087   ~vtkDirectory() ;
    00088 private:
    00089   char* Path;           // Path to Open'ed directory
    00090   char** Files;                 // Array of Files
    00091   int NumberOfFiles;            // Number if files in open directory
    00092
    00093 private:
    00094   vtkDirectory(const vtkDirectory&);  // Not implemented.
    00095   void operator=(const vtkDirectory&);  // Not implemented.
    00096 };
    00097
    00098 #endif