function _multipleToStruct($files)
    {
        $struct = array('dirs' => array(), 'files' => array());
        settype($files, 'array');
        foreach ($files as $file) {
            if (is_dir($file) && !is_link($file)) {
                $tmp    = System::_dirToStruct($file, 0);
                $struct = array_merge_recursive($tmp, $struct);
            } else {
                if (!in_array($file, $struct['files'])) {
                    $struct['files'][] = $file;
                }
            }
        }
        return $struct;
    }
function _multipleToStruct($files)
    {
        $struct = array('dirs' => array(), 'files' => array());
        settype($files, 'array');
        foreach ($files as $file) {
            if (is_dir($file) && !is_link($file)) {
                $tmp    = System::_dirToStruct($file, 0);
                $struct = array_merge_recursive($tmp, $struct);
            } else {
                if (!in_array($file, $struct['files'])) {
                    $struct['files'][] = $file;
                }
            }
        }
        return $struct;
    }
function _multipleToStruct ( $ files ) { $ struct = array ( 'dirs' => array ( ) , 'files' => array ( ) ) ; settype ( $ files , 'array' ) ; foreach ( $ files as $ file ) { if ( is_dir ( $ file ) && ! is_link ( $ file ) ) { $ tmp = System :: _dirToStruct ( $ file , 0 ) ; $ struct = array_merge_recursive ( $ tmp , $ struct ) ; } else { if ( ! in_array ( $ file , $ struct [ 'files' ] ) ) { $ struct [ 'files' ] [ ] = $ file ; } } } return $ struct ; }
Creates a nested array representing the structure of a directory and files

@param    array $files Array listing files and dirs
@return   array
@static
@see System::_dirToStruct()
Creates a nested array representing the structure of a directory and files