Flow.Launcher/Flow.Launcher.Infrastructure/Storage/PluginJsonStorage.cs

20 lines
674 B
C#
Raw Normal View History

using System.IO;
2020-04-21 09:12:17 +00:00
using Flow.Launcher.Infrastructure.UserSettings;
2020-04-21 09:12:17 +00:00
namespace Flow.Launcher.Infrastructure.Storage
{
2016-04-26 21:45:31 +00:00
public class PluginJsonStorage<T> :JsonStrorage<T> where T : new()
{
2016-04-26 21:45:31 +00:00
public PluginJsonStorage()
{
// C# releated, add python releated below
var dataType = typeof(T);
var assemblyName = typeof(T).Assembly.GetName().Name;
DirectoryPath = Path.Combine(DataLocation.DataDirectory(), DirectoryName, Constant.Plugins, assemblyName);
Helper.ValidateDirectory(DirectoryPath);
FilePath = Path.Combine(DirectoryPath, $"{dataType.Name}{FileSuffix}");
}
}
}