(configurationPath: string, configuration: Configuration)
| 177 | } |
| 178 | |
| 179 | export async function writeSshConfiguration(configurationPath: string, configuration: Configuration): Promise<void> { |
| 180 | configurationPath = resolveHome(configurationPath); |
| 181 | try { |
| 182 | await vscode.workspace.fs.createDirectory(vscode.Uri.file(path.dirname(configurationPath))); |
| 183 | await fs.writeFile(configurationPath, configuration.toString()); |
| 184 | } catch { |
| 185 | getSshChannel().appendLine(localize("failed.to.write.file", "Failed to write to file {0}.", configurationPath)); |
| 186 | } |
| 187 | } |
| 188 | |
| 189 | async function getSshConfigSource(configurationPath: string): Promise<string> { |
| 190 | configurationPath = resolveHome(configurationPath); |
no test coverage detected