original_string: protected function installFiles($installPath, $downloadPath, $publicPath, $files = [])
      {
          foreach ($files as $file => $overwrite) {
              if ($overwrite || (! $overwrite && ! file_exists($installPath . '/' . $file))) {
                  if (! file_exists($downloadPath . '/' . $file)) {
                      throw new FilesystemException('The file ' . $file . ' could not be found. Please report to cupoftea/wordpress.');
                  }
                  
                  $installFile = $installPath . '/' . $file;
                  
                  if ($publicPath != 'public') {
                      $installFile = $installPath . '/' . preg_replace('/^public/', $publicPath, $file);
                  }
                  
                  if (preg_match('/\\/$/', $file)) {
                      $this->filesystem->ensureDirectoryExists($installFile);
                      
                      continue;
                  }
                  
                  $this->filesystem->rename($downloadPath . '/' . $file, $installFile);
              }
          }
      }
code: protected function installFiles($installPath, $downloadPath, $publicPath, $files = [])
      {
          foreach ($files as $file => $overwrite) {
              if ($overwrite || (! $overwrite && ! file_exists($installPath . '/' . $file))) {
                  if (! file_exists($downloadPath . '/' . $file)) {
                      throw new FilesystemException('The file ' . $file . ' could not be found. Please report to cupoftea/wordpress.');
                  }
                  
                  $installFile = $installPath . '/' . $file;
                  
                  if ($publicPath != 'public') {
                      $installFile = $installPath . '/' . preg_replace('/^public/', $publicPath, $file);
                  }
                  
                  if (preg_match('/\\/$/', $file)) {
                      $this->filesystem->ensureDirectoryExists($installFile);
                      
                      continue;
                  }
                  
                  $this->filesystem->rename($downloadPath . '/' . $file, $installFile);
              }
          }
      }
code_tokens: protected function installFiles ( $ installPath , $ downloadPath , $ publicPath , $ files = [ ] ) { foreach ( $ files as $ file => $ overwrite ) { if ( $ overwrite || ( ! $ overwrite && ! file_exists ( $ installPath . '/' . $ file ) ) ) { if ( ! file_exists ( $ downloadPath . '/' . $ file ) ) { throw new FilesystemException ( 'The file ' . $ file . ' could not be found. Please report to cupoftea/wordpress.' ) ; } $ installFile = $ installPath . '/' . $ file ; if ( $ publicPath != 'public' ) { $ installFile = $ installPath . '/' . preg_replace ( '/^public/' , $ publicPath , $ file ) ; } if ( preg_match ( '/\\/$/' , $ file ) ) { $ this -> filesystem -> ensureDirectoryExists ( $ installFile ) ; continue ; } $ this -> filesystem -> rename ( $ downloadPath . '/' . $ file , $ installFile ) ; } } }
docstring: Install files.
  
  @param  string  $installPath
  @param  string  $downloadPath
  @param  string  $publicPath
  @param  array  $files
  @return void
docstring_tokens: Install files .