original_string: public function deleteLocalFiles($localPath)
      {
          $it = new RecursiveDirectoryIterator(
              $localPath,
              RecursiveDirectoryIterator::SKIP_DOTS
          );
  
          $files = new RecursiveIteratorIterator(
              $it,
              RecursiveIteratorIterator::CHILD_FIRST
          );
  
          foreach ($files as $file) {
              if ($file->isDir()) {
                  rmdir($file->getRealPath());
              } else {
                  unlink($file->getRealPath());
              }
          }
  
          rmdir($localPath);
      }
code: public function deleteLocalFiles($localPath)
      {
          $it = new RecursiveDirectoryIterator(
              $localPath,
              RecursiveDirectoryIterator::SKIP_DOTS
          );
  
          $files = new RecursiveIteratorIterator(
              $it,
              RecursiveIteratorIterator::CHILD_FIRST
          );
  
          foreach ($files as $file) {
              if ($file->isDir()) {
                  rmdir($file->getRealPath());
              } else {
                  unlink($file->getRealPath());
              }
          }
  
          rmdir($localPath);
      }
code_tokens: public function deleteLocalFiles ( $ localPath ) { $ it = new RecursiveDirectoryIterator ( $ localPath , RecursiveDirectoryIterator :: SKIP_DOTS ) ; $ files = new RecursiveIteratorIterator ( $ it , RecursiveIteratorIterator :: CHILD_FIRST ) ; foreach ( $ files as $ file ) { if ( $ file -> isDir ( ) ) { rmdir ( $ file -> getRealPath ( ) ) ; } else { unlink ( $ file -> getRealPath ( ) ) ; } } rmdir ( $ localPath ) ; }
docstring: Deletes all local stored files
  
  @param $localPath
  @return \Shockwavemk\Mail\Base\Model\Storages\DefaultStorage
docstring_tokens: Deletes all local stored files