(ctx context.Context, data wshrpc.CommandFileRestoreBackupData)
| 410 | } |
| 411 | |
| 412 | func (ws *WshServer) FileRestoreBackupCommand(ctx context.Context, data wshrpc.CommandFileRestoreBackupData) error { |
| 413 | expandedBackupPath, err := wavebase.ExpandHomeDir(data.BackupFilePath) |
| 414 | if err != nil { |
| 415 | return fmt.Errorf("failed to expand backup file path: %w", err) |
| 416 | } |
| 417 | expandedRestorePath, err := wavebase.ExpandHomeDir(data.RestoreToFileName) |
| 418 | if err != nil { |
| 419 | return fmt.Errorf("failed to expand restore file path: %w", err) |
| 420 | } |
| 421 | return filebackup.RestoreBackup(expandedBackupPath, expandedRestorePath) |
| 422 | } |
| 423 | |
| 424 | func (ws *WshServer) GetTempDirCommand(ctx context.Context, data wshrpc.CommandGetTempDirData) (string, error) { |
| 425 | tempDir := os.TempDir() |
nothing calls this directly
no test coverage detected