original_string: protected final static function wipeDir($dir, $rmdir = false) {
  		if (file_exists($dir)) {
  			$it = new \RecursiveDirectoryIterator($dir, \RecursiveDirectoryIterator::SKIP_DOTS);
  			$files = new \RecursiveIteratorIterator($it, \RecursiveIteratorIterator::CHILD_FIRST);
  			foreach ($files as $file)
  
  				if ($file->isDir())
  					self::wipeDir($file->getRealPath(), true); //rmdir($file->getRealPath());
  				else
  					unlink($file->getRealPath());
  
  
  			if ($rmdir)
  				rmdir($dir);
  		}
  	}
code: protected final static function wipeDir($dir, $rmdir = false) {
  		if (file_exists($dir)) {
  			$it = new \RecursiveDirectoryIterator($dir, \RecursiveDirectoryIterator::SKIP_DOTS);
  			$files = new \RecursiveIteratorIterator($it, \RecursiveIteratorIterator::CHILD_FIRST);
  			foreach ($files as $file)
  
  				if ($file->isDir())
  					self::wipeDir($file->getRealPath(), true); //rmdir($file->getRealPath());
  				else
  					unlink($file->getRealPath());
  
  
  			if ($rmdir)
  				rmdir($dir);
  		}
  	}
code_tokens: protected final static function wipeDir ( $ dir , $ rmdir = false ) { if ( file_exists ( $ dir ) ) { $ it = new \ RecursiveDirectoryIterator ( $ dir , \ RecursiveDirectoryIterator :: SKIP_DOTS ) ; $ files = new \ RecursiveIteratorIterator ( $ it , \ RecursiveIteratorIterator :: CHILD_FIRST ) ; foreach ( $ files as $ file ) if ( $ file -> isDir ( ) ) self :: wipeDir ( $ file -> getRealPath ( ) , true ) ; //rmdir($file->getRealPath()); else unlink ( $ file -> getRealPath ( ) ) ; if ( $ rmdir ) rmdir ( $ dir ) ; } }
docstring: Remove everything in a directory
  @param string $dir directiory to wipe
  @param boolean $rmdir remove directory also?
docstring_tokens: Remove everything in a directory