about summary refs log tree commit diff
path: root/MatrixRoomUtils.Bot/Bot/FileStorageProvider.cs
diff options
context:
space:
mode:
authorTheArcaneBrony <myrainbowdash949@gmail.com>2023-06-30 03:36:58 +0200
committerTheArcaneBrony <myrainbowdash949@gmail.com>2023-06-30 03:36:58 +0200
commitbb8c2637af3b7982e7a4b2fd15e2fbec613d0848 (patch)
treeb8075ba7e507aad3f96f354712ad920ac421e474 /MatrixRoomUtils.Bot/Bot/FileStorageProvider.cs
parentUpdate stuff (diff)
downloadMatrixUtils-bb8c2637af3b7982e7a4b2fd15e2fbec613d0848.tar.xz
Todays progress
Diffstat (limited to 'MatrixRoomUtils.Bot/Bot/FileStorageProvider.cs')
-rw-r--r--MatrixRoomUtils.Bot/Bot/FileStorageProvider.cs10
1 files changed, 5 insertions, 5 deletions
diff --git a/MatrixRoomUtils.Bot/Bot/FileStorageProvider.cs b/MatrixRoomUtils.Bot/Bot/FileStorageProvider.cs

index 0061c1f..8b9e726 100644 --- a/MatrixRoomUtils.Bot/Bot/FileStorageProvider.cs +++ b/MatrixRoomUtils.Bot/Bot/FileStorageProvider.cs
@@ -23,13 +23,13 @@ public class FileStorageProvider : IStorageProvider { } } - public async Task SaveObject<T>(string key, T value) => await File.WriteAllTextAsync(Path.Join(TargetPath, key), ObjectExtensions.ToJson(value)); + public async Task SaveObjectAsync<T>(string key, T value) => await File.WriteAllTextAsync(Path.Join(TargetPath, key), ObjectExtensions.ToJson(value)); - public async Task<T?> LoadObject<T>(string key) => JsonSerializer.Deserialize<T>(await File.ReadAllTextAsync(Path.Join(TargetPath, key))); + public async Task<T?> LoadObjectAsync<T>(string key) => JsonSerializer.Deserialize<T>(await File.ReadAllTextAsync(Path.Join(TargetPath, key))); - public async Task<bool> ObjectExists(string key) => File.Exists(Path.Join(TargetPath, key)); + public async Task<bool> ObjectExistsAsync(string key) => File.Exists(Path.Join(TargetPath, key)); - public async Task<List<string>> GetAllKeys() => Directory.GetFiles(TargetPath).Select(Path.GetFileName).ToList(); + public async Task<List<string>> GetAllKeysAsync() => Directory.GetFiles(TargetPath).Select(Path.GetFileName).ToList(); - public async Task DeleteObject(string key) => File.Delete(Path.Join(TargetPath, key)); + public async Task DeleteObjectAsync(string key) => File.Delete(Path.Join(TargetPath, key)); } \ No newline at end of file