mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
19 lines
674 B
C#
19 lines
674 B
C#
using System.IO;
|
|
using Flow.Launcher.Infrastructure.UserSettings;
|
|
|
|
namespace Flow.Launcher.Infrastructure.Storage
|
|
{
|
|
public class PluginJsonStorage<T> :JsonStrorage<T> where T : new()
|
|
{
|
|
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}");
|
|
}
|
|
}
|
|
}
|