Assumed $structure contains an array like this:
array('Core' = array('AbstractFactory' => array('test.php' => 'some text content',
'other.php' => 'Some more text content',
'Invalid.csv' => 'Something else',
),
'AnEmptyFolder' => array(),
'badlocation.php' => 'some bad content',
)
)
the resulting directory tree will look like this:
baseDir
\- Core
|- badlocation.php
|- AbstractFactory
| |- test.php
| |- other.php
| \- Invalid.csv
\- AnEmptyFolder
Arrays will become directories with their key as directory name, and
strings becomes files with their key as file name and their value as file
content.
If no baseDir is given it will try to add the structure to the existing
root directory without replacing existing childs except those with equal
names.