/**
 * platform_launch_list_path: used to list all files contained within $path
 * @param string $path  The path to get all file lists
 * @param boolean $dir Determines whether to include a directory listings
 * @param array $exclusion A collection of paths to exclude from listings
 *
 * @return Mixed $contents Array containing the list of files within $path
 */
function platform_launch_list_path($path, $dir = false, $exclusion = null)
{
    platform_launch_php(PLATFORM_SANDBOX_SYSTEM_FUNCTIONS_PATH . DS . 'filesystem');
    $lists = array();
    $contents = read_path($path);
    if (!is_null($contents) && is_array($contents)) {
        foreach ($contents as $content) {
            if (stristr($content, '.php') || stristr($content, '.txt') || stristr($content, '.css') || stristr($content, '.html')) {
            } else {
                if ($dir && is_dir($path . DS . $content)) {
                    $lists[] = $content;
                }
            }
        }
    }
    return $lists;
}
function list_files($path, $ext)
{
    return read_path($path, $ext);
}