Location: PHPKode > projects > JavaScript PHP Window Manager > jpwm0.32/php/applications.php
<?php
	function getApplicationList($dir)
	{
		$ret = array();
		if(is_dir($dir))
		{
			if($dirHandle = opendir($dir))
			{
				while (($file = readdir($dirHandle)) !== false)
				{
					if(is_dir($dir . $file) && is_file($dir . $file . '/info'))
					{
						$infoFile = file($dir . $file . '/info');
						$ret[] = $infoFile + array("file" => $file);
					}
				}
			}
			closedir($dirHandle);
		}
		foreach($ret as $id => $infos)
		{
			foreach($infos as $id2 => $info)
			{
				$ret[$id][$id2] = trim($info);
			}
		}
		return $ret;
	}
?>
Return current item: JavaScript PHP Window Manager