function _textimage_image_list in Textimage 5
Same name and namespace in other branches
- 5.2 textimage_admin.inc \_textimage_image_list()
- 6.2 textimage_admin.inc \_textimage_image_list()
- 7.2 textimage.admin.inc \_textimage_image_list()
Returns an array of files with jpg, png, and gif extensions in the specified directory.
2 calls to _textimage_image_list()
File
- ./
textimage.module, line 1186
Code
function _textimage_image_list($imagesdir) {
$filelist = array();
if (is_dir($imagesdir) && ($handle = opendir($imagesdir))) {
while ($file = readdir($handle)) {
if (preg_match("/\\.gif|\\.png|\\.jpg\$/i", $file) == 1) {
$filelist[] = $imagesdir . '/' . $file;
}
}
closedir($handle);
}
return $filelist;
}