ListFiles

by Joe Strout

ListFiles is not a class; instead, it is a simple module which defines one function. ListFiles(p) returns a StringList of all the files contained under FilePath p, where p must point to a directory. ListFiles() (with no pathname given) does the same thing, but always returns a list of files in the current working directory.

If StringList is not already defined, it defaults to vector -- i.e., a Standard Template Library vector of Strings. You may replace this with your own class if you wish; it must have an append(s) method, where s is the string class used in your FilePath code.


Here's the code...

For an example program using ListFiles, FilePath, and MatchWild, see rename.cpp.

http://www-ncmir.ucsd.edu/~jstrout/classlib/ListFiles.html
Last Updated: 6/17/96 Joe Strout ( joe@strout.net )