Back to PhocacartAttribute class

Method removeDownloadFolderAndFiles

public static
removeDownloadFolderAndFiles
(mixed $folderFiles, mixed $pathAttributes)

Method removeDownloadFolderAndFiles - Source code

public static function removeDownloadFolderAndFiles($folderFiles, $pathAttributes)
{
    if (!empty($folderFiles)) {
        foreach ($folderFiles as $kF => $vF) {
            // Folder will remove the file(s) too
            if (Folder::exists($pathAttributes['orig_abs_ds'] . $vF['download_folder'])) {
                Folder::delete($pathAttributes['orig_abs_ds'] . $vF['download_folder']);
            }
        }
    }
}