VTK
vtkDirectory.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkDirectory.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
28 #ifndef vtkDirectory_h
29 #define vtkDirectory_h
30 
31 #include "vtkCommonSystemModule.h" // For export macro
32 #include "vtkObject.h"
33 
34 class vtkStringArray;
35 
37 {
38 public:
40 
41  vtkTypeMacro(vtkDirectory,vtkObject);
43 
45  static vtkDirectory *New();
46 
48  virtual void PrintSelf(ostream& os, vtkIndent indent);
49 
53  int Open(const char* dir);
54 
56  vtkIdType GetNumberOfFiles();
57 
59  const char* GetFile(vtkIdType index);
60 
65  int FileIsDirectory(const char *name);
66 
68 
69  vtkGetObjectMacro(Files, vtkStringArray);
71 
73  static const char* GetCurrentWorkingDirectory(char* buf, unsigned int len);
74 
76  static int MakeDirectory(const char* dir);
77 
79  static int DeleteDirectory(const char* dir);
80 
82  static int Rename(const char* oldname, const char* newname);
83 
84 protected:
85  // delete the Files and Path ivars and set
86  // NumberOfFiles to 0
87  void CleanUpFilesAndPath();
88  vtkDirectory();
89  ~vtkDirectory() ;
90 
91 private:
92  char* Path; // Path to Open'ed directory
93  vtkStringArray *Files; // VTK array of files
94 
95  static int CreateDirectoryInternal(const char* dir);
96 
97 private:
98  vtkDirectory(const vtkDirectory&); // Not implemented.
99  void operator=(const vtkDirectory&); // Not implemented.
100 };
101 
102 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:61
a vtkAbstractArray subclass for strings
int vtkIdType
Definition: vtkType.h:275
#define VTKCOMMONSYSTEM_EXPORT
virtual void PrintSelf(ostream &os, vtkIndent indent)
a simple class to control print indentation
Definition: vtkIndent.h:38
OS independent class for access and manipulation of system directories.
Definition: vtkDirectory.h:36
static vtkObject * New()