public static function GetDirContent($path)
    {
        $files = array();
        $directory = opendir($path);

        while(($file = readdir($directory)) !== false)
        {
            $full_path = $path . "/" . $file;

            if(is_file($full_path))
            {
                $files[] = $full_path;
            }
            elseif($file != "." && $file != ".." && is_dir($full_path))
            {
                $files[] = $full_path;
                $files = array_merge($files, self::GetDirContent($full_path));
            }
        }

        closedir($directory);

        return $files;
    }
public static function GetDirContent($path)
    {
        $files = array();
        $directory = opendir($path);

        while(($file = readdir($directory)) !== false)
        {
            $full_path = $path . "/" . $file;

            if(is_file($full_path))
            {
                $files[] = $full_path;
            }
            elseif($file != "." && $file != ".." && is_dir($full_path))
            {
                $files[] = $full_path;
                $files = array_merge($files, self::GetDirContent($full_path));
            }
        }

        closedir($directory);

        return $files;
    }
public static function GetDirContent ( $ path ) { $ files = array ( ) ; $ directory = opendir ( $ path ) ; while ( ( $ file = readdir ( $ directory ) ) !== false ) { $ full_path = $ path . "/" . $ file ; if ( is_file ( $ full_path ) ) { $ files [ ] = $ full_path ; } elseif ( $ file != "." && $ file != ".." && is_dir ( $ full_path ) ) { $ files [ ] = $ full_path ; $ files = array_merge ( $ files , self :: GetDirContent ( $ full_path ) ) ; } } closedir ( $ directory ) ; return $ files ; }
Get all the files and directories available on a specified path.
@param string $path
@return array List of files found.
Get all the files and directories available on a specified path .