mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-16 04:29:16 +08:00
21 lines
571 B
C#
21 lines
571 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Wox.Infrastructure.Storage
|
|
{
|
|
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}");
|
|
}
|
|
}
|
|
} |