![]() |
• File Manager | ||||||||||||
|
API Links
Developer Links
|
FileMgr::BuildFileListDefined in:
Enumerates the files in a given directory.
C4Files.hPrototype
Parameters
Description
The BuildFileList function enumerates the files in the directory given by the directory parameter and instantiates a FileReference object for each file in the directory. These objects are placed into the list given by the list parameter.One typically calls BuildFileList to obtain a list of files in a particular directory and then iterates through the list to examine each file individually. When the list of FileReference objects is no longer needed, the memory for each of the objects should be released. This can be done by calling the List::Purge function or by destroying the List object itself.If a filter function is specified by the proc parameter, then it is called for each file as the list is being built to determine whether the file should be included in the list. The BuildProc type is defined as follows.
name parameter of the filter function recieves a pointer to the file name, the flags parameter receives the flags associated with the file, and the cookie parameter receives the value passed to the cookie parameter of the BuildFileList function. The flags associated with a file can be a combination (through logical OR) of the following bit values.
true to indicate that the file should be included in the file list and should return false to indicate that the file should be skipped.If no filter function is specified, then the default filter function is used. The default filter function returns false if the kFileInvisible flag is set or if the file name begins with a period, and returns true otherwise.
|