Documentation

BaseSpiders.php

Basic classes for spiders

Table of Contents

Classes

SetSpider
Entity Set Spider.

Functions

dirtree()  : mixed
Create a multidimensional array directory map

Functions

dirtree()

Create a multidimensional array directory map

dirtree(string $dir[, string $regex = '' ][, bool $ignoreEmpty = false ]) : mixed

It builds a directory map for a specified directory, e.g.:

Array
(
    [dir_name] => Array
        (
            [0] => file.ext
            [1] => file.ext
        )

    [dir_name] => Array
        (
            [0] => [dir_name] => Array
                (
                    [0] => file.ext
                    [1] => file.ext
                )
            [1] => [dir_name] => Array
                (
                    [0] => file.ext
                    [1] => file.ext
                )
        )
)
Parameters
$dir : string

root directory from where to start the dirtree.

$regex : string = ''

regex for filtering filenames.

$ignoreEmpty : bool = false

ignore empty directories.

Tags
see
https://stackoverflow.com/questions/45382701/multidimensional-array-directory-map
SuppressWarnings

(PHPMD.BooleanArgumentFlag)

author

Davide Lanza davide.lanza@eikonproject.org


        
On this page

Search results