<?php
function getFiles($expression,$flags = null) {
	$files = glob($expression,$flags);

	foreach($files as $file) {
		if(is_dir($file)) {
			$allFiles[] = array(
				'name'		=>$file,
				'type'		=>'dir',
				'readable'	=>is_readable($file)      ? 1 : 0,
				'writeable'   =>is_writable($file)      ? 1 : 0,
				'executable'  =>is_executable($file)    ? 1 : 0
			);
		} elseif (is_file($file)) {
			$allFiles[] = array(
				'name'		=>$file,
				'type'		=>'file',
				'readable'	=>is_readable($file)      ? 1 : 0,
				'writeable'   =>is_writable($file)      ? 1 : 0,
				'executable'  =>is_executable($file)    ? 1 : 0,
				'uploaded'	=>is_uploaded_file($file) ? 1 : 0,
				'filesize'    =>filesize($file),
				'changed'     =>filectime($file),
				'modified'    =>filemtime($file)
			);
		}
	}
	
	return $allFiles;
}
?>
[i]Update: meer bestandinformatie erbij gezet[/i]