Public Member Functions | Static Public Member Functions | Protected Member Functions

vtkGlobFileNames Class Reference

find files that match a wildcard pattern More...

#include <vtkGlobFileNames.h>

Inheritance diagram for vtkGlobFileNames:
Inheritance graph
[legend]
Collaboration diagram for vtkGlobFileNames:
Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual void PrintSelf (ostream &os, vtkIndent indent)
void Reset ()
int AddFileNames (const char *pattern)
int GetNumberOfFileNames ()
const char * GetNthFileName (int index)

virtual void SetDirectory (const char *)
virtual char * GetDirectory ()

virtual void SetRecurse (int)
virtual void RecurseOn ()
virtual void RecurseOff ()
virtual int GetRecurse ()

virtual vtkStringArray * GetFileNames ()

Static Public Member Functions

static vtkGlobFileNames * New ()

Protected Member Functions

 vtkGlobFileNames ()
 ~vtkGlobFileNames ()

virtual void SetPattern (const char *)
virtual char * GetPattern ()



typedef vtkObject Superclass
virtual const char * GetClassName ()
virtual int IsA (const char *type)
static int IsTypeOf (const char *type)
static vtkGlobFileNames * SafeDownCast (vtkObject *o)

Detailed Description

find files that match a wildcard pattern

vtkGlobFileNames is a utility for finding files and directories that match a given wildcard pattern. Allowed wildcards are , ?, [...], [!...]. The "*" wildcard matches any substring, the "?" matches any single character, the [...] matches any one of the enclosed characters, e.g. [abc] will match one of a, b, or c, while [0-9] will match any digit, and [!...] will match any single character except for the ones within the brackets. Special treatment is given to "/" (or "\" on Windows) because these are path separators. These are never matched by a wildcard, they are only matched with another file separator.

Warning:
This function performs case-sensitive matches on UNIX and case-insensitive matches on Windows.
See also:
vtkDirectory
Tests:
vtkGlobFileNames (Tests)

Definition at line 45 of file vtkGlobFileNames.h.


Member Typedef Documentation

Return the class name as a string.

Reimplemented from vtkObject.

Definition at line 50 of file vtkGlobFileNames.h.


Constructor & Destructor Documentation

vtkGlobFileNames::vtkGlobFileNames (  )  [protected]
vtkGlobFileNames::~vtkGlobFileNames (  )  [protected]

Member Function Documentation

virtual const char* vtkGlobFileNames::GetClassName (  )  [virtual]

Return the class name as a string.

Reimplemented from vtkObject.

static int vtkGlobFileNames::IsTypeOf ( const char *  type  )  [static]

Return the class name as a string.

Reimplemented from vtkObject.

virtual int vtkGlobFileNames::IsA ( const char *  type  )  [virtual]

Return the class name as a string.

Reimplemented from vtkObject.

static vtkGlobFileNames* vtkGlobFileNames::SafeDownCast ( vtkObject *  o  )  [static]

Return the class name as a string.

Reimplemented from vtkObject.

static vtkGlobFileNames* vtkGlobFileNames::New (  )  [static]

Create a new vtkGlobFileNames object.

Reimplemented from vtkObject.

virtual void vtkGlobFileNames::PrintSelf ( ostream &  os,
vtkIndent  indent 
) [virtual]

Print directory to stream.

Reimplemented from vtkObject.

void vtkGlobFileNames::Reset (  ) 

Reset the glob by clearing the list of output filenames.

virtual void vtkGlobFileNames::SetDirectory ( const char *   )  [virtual]

Set the directory in which to perform the glob. If this is not set, then the current directory will be used. Also, if you use a glob pattern that contains absolute path (one that starts with "/" or a drive letter) then that absolute path will be used and Directory will be ignored.

virtual char* vtkGlobFileNames::GetDirectory (  )  [virtual]

Set the directory in which to perform the glob. If this is not set, then the current directory will be used. Also, if you use a glob pattern that contains absolute path (one that starts with "/" or a drive letter) then that absolute path will be used and Directory will be ignored.

int vtkGlobFileNames::AddFileNames ( const char *  pattern  ) 

Search for all files that match the given expression, sort them, and add them to the output. This method can be called repeatedly to add files matching additional patterns. Returns 1 if successful, otherwise returns zero.

virtual void vtkGlobFileNames::SetRecurse ( int   )  [virtual]

Recurse into subdirectories.

virtual void vtkGlobFileNames::RecurseOn (  )  [virtual]

Recurse into subdirectories.

virtual void vtkGlobFileNames::RecurseOff (  )  [virtual]

Recurse into subdirectories.

virtual int vtkGlobFileNames::GetRecurse (  )  [virtual]

Recurse into subdirectories.

int vtkGlobFileNames::GetNumberOfFileNames (  ) 

Return the number of files found.

const char* vtkGlobFileNames::GetNthFileName ( int  index  ) 

Return the file at the given index, the indexing is 0 based.

virtual vtkStringArray* vtkGlobFileNames::GetFileNames (  )  [virtual]

Get an array that contains all the file names.

virtual void vtkGlobFileNames::SetPattern ( const char *   )  [protected, virtual]

Set the wildcard pattern.

virtual char* vtkGlobFileNames::GetPattern (  )  [protected, virtual]

Set the wildcard pattern.


The documentation for this class was generated from the following file: