Section: Visualization Toolkit Common Classes
To create an instance of class vtkDirectory, simply invoke its constructor as follows
obj = vtkDirectory
obj
is an instance of the vtkDirectory class.
string = obj.GetClassName ()
- Return the class name as a string.
int = obj.IsA (string name)
- Return the class name as a string.
vtkDirectory = obj.NewInstance ()
- Return the class name as a string.
vtkDirectory = obj.SafeDownCast (vtkObject o)
- Return the class name as a string.
int = obj.Open (string dir)
- Open the specified directory and load the names of the files
in that directory. 0 is returned if the directory can not be
opened, 1 if it is opened.
vtkIdType = obj.GetNumberOfFiles ()
- Return the number of files in the current directory.
string = obj.GetFile (vtkIdType index)
- Return the file at the given index, the indexing is 0 based
int = obj.FileIsDirectory (string name)
- Return true if the file is a directory. If the file is not an
absolute path, it is assumed to be relative to the opened
directory. If no directory has been opened, it is assumed to
be relative to the current working directory.
vtkStringArray = obj.GetFiles ()
- Get an array that contains all the file names.