Model/Album.php
private function createFolder($folder_name)
    {
        # Folder to store galleries folders
        $galleries_path = WWW_ROOT . 'files' . DS . 'gallery';

        # Gallery folder
        $folder_path = $galleries_path . DS . $folder_name;

        # Check if webroot/files and webroot/files/gallery folder are created
        if (!is_dir($galleries_path)) {
            if (!is_dir(WWW_ROOT . 'files')) {
                # Create webroot/files folder if dont exists
                new Folder(WWW_ROOT . 'files', true, 0755);
            }
            # Create webroot/files/gallery folder if dont exists
            new Folder($galleries_path, true, 0755);
        }
        if (!is_dir($folder_path)) {
            # Create gallery folder if dont exists
            new Folder($folder_path, true, 0755);
        }
    }
private function createFolder($folder_name)
    {
        # Folder to store galleries folders
        $galleries_path = WWW_ROOT . 'files' . DS . 'gallery';

        # Gallery folder
        $folder_path = $galleries_path . DS . $folder_name;

        # Check if webroot/files and webroot/files/gallery folder are created
        if (!is_dir($galleries_path)) {
            if (!is_dir(WWW_ROOT . 'files')) {
                # Create webroot/files folder if dont exists
                new Folder(WWW_ROOT . 'files', true, 0755);
            }
            # Create webroot/files/gallery folder if dont exists
            new Folder($galleries_path, true, 0755);
        }
        if (!is_dir($folder_path)) {
            # Create gallery folder if dont exists
            new Folder($folder_path, true, 0755);
        }
    }
Create an folder at webroot/files/gallery to store album pictures
@param $folder_name