references:joomla.framework:filesystem:jfolder-movemove
Moves a folder. This function uses FTP if enabled, otherwise, it will use the built in PHP functions. This function returns true on success, false otherwise. Syntaxmixed move ( $src, $dest, $path )
ExamplesIn this example a folder called ‘myfolder/oldsubfolder’ in the Joomla! root folder is moved (together with its contents) to ‘myfolder/newsubfolder’. Example jimport( 'joomla.filesystem.folder' ); global $mainframe; if (JFolder::move( 'oldsubfolder', 'newsubfolder', $mainframe->getCfg( 'absolute_path' ) . '/myfolder/' )) { echo "Folder moved!"; } else { echo "Could not move folder!"; } might produce: Result Folder moved! Discussion |


