public function removeAvatarDirectory() { $path = $this->avatarDirectory(); if (is_dir($path)) { app_rrmdir($path); } elseif (is_file($path)) { unlink($path); } }
/** * Delete all generated image files and folder of this images. */ public function deleteDirectory() { app_rrmdir($this->directory_path); }