Skip to content

Commit 7edade1

Browse files
committed
Renamed SaveFile/FolderAsync to CreateFile/FolderAsync
1 parent 09cf213 commit 7edade1

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

Microsoft.Toolkit.Uwp/Helpers/ObjectStorage/ApplicationDataStorageHelper.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -182,15 +182,15 @@ public Task<IList<Tuple<DirectoryItemType, string>>> ReadFolderAsync(string fold
182182
}
183183

184184
/// <inheritdoc />
185-
public Task SaveFileAsync<T>(string filePath, T value)
185+
public Task CreateFileAsync<T>(string filePath, T value)
186186
{
187-
return SaveFileAsync<T>(DefaultFolder, filePath, value);
187+
return CreateFileAsync<T>(DefaultFolder, filePath, value);
188188
}
189189

190190
/// <inheritdoc />
191-
public Task SaveFolderAsync(string folderPath)
191+
public Task CreateFolderAsync(string folderPath)
192192
{
193-
return SaveFolderAsync(DefaultFolder, folderPath);
193+
return CreateFolderAsync(DefaultFolder, folderPath);
194194
}
195195

196196
/// <inheritdoc />
@@ -243,12 +243,12 @@ private async Task<IList<Tuple<DirectoryItemType, string>>> ReadFolderAsync(Stor
243243
}).ToList();
244244
}
245245

246-
private Task SaveFileAsync<T>(StorageFolder folder, string filePath, T value)
246+
private Task CreateFileAsync<T>(StorageFolder folder, string filePath, T value)
247247
{
248248
return StorageFileHelper.WriteTextToFileAsync(folder, _serializer.Serialize(value)?.ToString(), filePath, CreationCollisionOption.ReplaceExisting);
249249
}
250250

251-
private async Task SaveFolderAsync(StorageFolder folder, string folderPath)
251+
private async Task CreateFolderAsync(StorageFolder folder, string folderPath)
252252
{
253253
await folder.CreateFolderAsync(folderPath, CreationCollisionOption.OpenIfExists);
254254
}

Microsoft.Toolkit/Helpers/ObjectStorage/IFileStorageHelper.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,14 @@ public interface IFileStorageHelper
4848
/// <param name="filePath">Path to the file that will contain the object.</param>
4949
/// <param name="value">Object to save.</param>
5050
/// <returns>Waiting task until completion.</returns>
51-
Task SaveFileAsync<T>(string filePath, T value);
51+
Task CreateFileAsync<T>(string filePath, T value);
5252

5353
/// <summary>
5454
/// Ensure a folder exists at the folder path specified.
5555
/// </summary>
5656
/// <param name="folderPath">The path and name of the target folder.</param>
5757
/// <returns>Waiting task until completion.</returns>
58-
Task SaveFolderAsync(string folderPath);
58+
Task CreateFolderAsync(string folderPath);
5959

6060
/// <summary>
6161
/// Deletes a file or folder item.

0 commit comments

Comments
 (0)