mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 18:57:19 +02:00
* spelling: arguments * spelling: config * spelling: deactivated * spelling: exception * spelling: folder * spelling: initialize * spelling: makesure * spelling: response * spelling: storage * spelling: visibility * spelling: serialized * spelling: zipped
21 lines
570 B
C#
21 lines
570 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> : JsonStorage<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}");
|
|
}
|
|
}
|
|
} |