original_string: private function clearAttachments($dir)
      {
          if (!file_exists($dir)) {
              mkdir($dir, 0777, true);
          }
  
          $files = glob($dir.'/*');
          foreach ($files as $file) {
              if (is_file($file)) {
                  unlink($file);
              }
          }
      }
code: private function clearAttachments($dir)
      {
          if (!file_exists($dir)) {
              mkdir($dir, 0777, true);
          }
  
          $files = glob($dir.'/*');
          foreach ($files as $file) {
              if (is_file($file)) {
                  unlink($file);
              }
          }
      }
code_tokens: private function clearAttachments ( $ dir ) { if ( ! file_exists ( $ dir ) ) { mkdir ( $ dir , 0777 , true ) ; } $ files = glob ( $ dir . '/*' ) ; foreach ( $ files as $ file ) { if ( is_file ( $ file ) ) { unlink ( $ file ) ; } } }
docstring: Clear all previous email attachments
docstring_tokens: Clear all previous email attachments