2023-04-25 12:04:08 +00:00
|
|
|
|
using System.IO;
|
2020-04-21 09:12:17 +00:00
|
|
|
|
using Flow.Launcher.Infrastructure.UserSettings;
|
2017-02-07 00:21:39 +00:00
|
|
|
|
|
2020-04-21 09:12:17 +00:00
|
|
|
|
namespace Flow.Launcher.Infrastructure.Storage
|
2017-02-07 00:21:39 +00:00
|
|
|
|
{
|
2021-05-11 19:10:03 +00:00
|
|
|
|
public class FlowLauncherJsonStorage<T> : JsonStorage<T> where T : new()
|
2017-02-07 00:21:39 +00:00
|
|
|
|
{
|
2020-04-21 12:16:10 +00:00
|
|
|
|
public FlowLauncherJsonStorage()
|
2017-02-07 00:21:39 +00:00
|
|
|
|
{
|
2020-04-01 11:20:33 +00:00
|
|
|
|
var directoryPath = Path.Combine(DataLocation.DataDirectory(), DirectoryName);
|
2017-02-07 00:21:39 +00:00
|
|
|
|
Helper.ValidateDirectory(directoryPath);
|
|
|
|
|
|
|
|
|
|
|
|
var filename = typeof(T).Name;
|
|
|
|
|
|
FilePath = Path.Combine(directoryPath, $"{filename}{FileSuffix}");
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2019-12-03 21:02:24 +00:00
|
|
|
|
}
|