PowerToys/Wox.Infrastructure/Storage/WoxJsonStorage.cs

21 lines
571 B
C#
Raw Normal View History

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Wox.Infrastructure.Storage
{
2019-12-04 05:02:24 +08:00
public class WoxJsonStorage<T> : JsonStrorage<T> where T : new()
{
public WoxJsonStorage()
{
var directoryPath = Path.Combine(Constant.DataDirectory, DirectoryName);
Helper.ValidateDirectory(directoryPath);
var filename = typeof(T).Name;
FilePath = Path.Combine(directoryPath, $"{filename}{FileSuffix}");
}
}
2019-12-04 05:02:24 +08:00
}