forked from 0x7c13/Notepads
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
622594c
commit ff46f12
Showing
6 changed files
with
55 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
namespace Notepads.Utilities | ||
{ | ||
using System; | ||
using System.Collections.Concurrent; | ||
using System.Collections.Generic; | ||
using System.Threading.Tasks; | ||
using Microsoft.Toolkit.Uwp.Helpers; | ||
using Notepads.Core; | ||
using Notepads.Services; | ||
using Windows.Storage; | ||
using Microsoft.AppCenter.Analytics; | ||
internal static class BackupSessionUtility | ||
{ | ||
public static async Task<StorageFolder> GetBackupFolderAsync(string backupFolderName) | ||
{ | ||
return await FileSystemUtility.GetOrCreateAppFolder(backupFolderName); | ||
} | ||
|
||
public static async Task<IReadOnlyList<StorageFile>> GetAllBackupFilesAsync(string backupFolderName) | ||
{ | ||
StorageFolder backupFolder = await GetBackupFolderAsync(backupFolderName); | ||
return await backupFolder.GetFilesAsync(); | ||
} | ||
|
||
public static async Task<StorageFile> CreateNewFileInBackupFolderAsync(string fileName, CreationCollisionOption collisionOption, string backupFolderName) | ||
{ | ||
StorageFolder backupFolder = await GetBackupFolderAsync(backupFolderName); | ||
return await backupFolder.CreateFileAsync(fileName, collisionOption); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters