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);
            }
        }
    }