Helper function for testing file_scan_directory().
Each time the function is called the file is stored in a static variable. When the function is called with no $filepath parameter, the results are returned.
$filepath: File path
If $filepath is NULL, an array of all previous $filepath parameters
function file_test_file_scan_callback($filepath = NULL) {
$files =& drupal_static(__FUNCTION__, array());
if (isset($filepath)) {
$files[] = $filepath;
}
else {
return $files;
}
}