I know how to create a subfolder inside the media folder by using <media folder="media" destination="com_mycom">
in the manifest file. But how to create subfolder inside of the images folder during the installation of my custom component for example by using install script? What code do I need to add in the file or inside of public function install($parent)
?
1 Answer
Put in the header of install script:
jimport('joomla.filesystem.folder');
and inside of function install($parent) put the code:
$path = JPATH_SITE . DIRECTORY_SEPARATOR . "images" . DIRECTORY_SEPARATOR . "mycom";
$mode = 0755;
JFolder::create($path, $mode);
DIRECTORY_SEPARATOR
for Joomla 3.x