improve settings import/export

This commit is contained in:
Felix Seidl committed 2020-04-10 13:52:23 +02:00
1 parent ad1a933207
commit ccd8c1eaa4
15 files changed
+296 -181

No files matched your search

@@ -84,6 +84,18 @@ namespace FluentTerminal.App.Services.Implementation
}
}
public async Task<string> ReadTextFileAsync(string path)
{
var response = await GetResponseAsync<StringValueResponse>(new ReadTextFileRequest { Path = path }).ConfigureAwait(false);
if (!response.Success)
{
throw new ReadTextFileException(string.IsNullOrWhiteSpace(response.Error) ? "Failed to read the file." : response.Error);
}
return response.Value;
}
public async Task<string> GetSshConfigDirAsync()
{
if (!string.IsNullOrEmpty(_sshConfigDir))