我需要创建一个备份服务,所以我打算在每个平台上保存 SQLite 数据库文件。卸载应用程序后,保存的文件应该可用。
我打算使用下载文件夹(应该在每个平台上都可用)。
我创建了一个接口并在每个平台上使用以下代码:
接口:
public interface IBackupService
{
string GetDownloadPath();
}
安卓:
public string GetDownloadPath()
{
return Android.OS.Environment.DirectoryDownloads;
}
超轻量级:
public string GetDownloadPath()
{
return Windows.Storage.KnownFolders.???????;
}
我该怎么办?有我可以使用的公共图书馆吗?