[TYPO3-dev] mkdir and mkdir_deep
Jigal van Hemert
jigal at xs4all.nl
Mon Feb 20 16:36:02 CET 2012
Hi,
On 20-2-2012 14:21, Oliver Salzburg wrote:
> On 2012-02-20 14:08, Jigal van Hemert wrote:
>> The first parameter is the directory path you want to create.
>> The second parameter is optional and kept for backwards compatibility (=
>> it was used in the past but we don't want to break code which still uses
>> it)
>
> Are you sure about that?
Hmm.. 'old' versions of TYPO3 (before 4.6) needed indeed two parameters:
First parameter was the path to an existing directory where you wanted
to create a subdirectory (or several levels)
The second parameter was the path you wanted to create below the first
parameter.
For example:
inside /var/www/mysite/fileadmin/templates/ you want to create
images/portraits/
You can call
t3lib_div::mkdir_deep('/var/www/mysite/fileadmin/templates/',
'images/portraits/'); to create these directories.
In 4.6 and higher you can combine the two paths. mkdir_deep will then
create directories as needed and will make sure the mask and group
settings are correct for all parts of the path.
Sorry about the confusion.
--
Kind regards / met vriendelijke groet,
Jigal van Hemert.
More information about the TYPO3-dev
mailing list