29 lines
754 B
C#
29 lines
754 B
C#
|
|
using System;
|
||
|
|
using System.IO;
|
||
|
|
using System.Threading.Tasks;
|
||
|
|
|
||
|
|
namespace BetterSeewo.Manager.Services
|
||
|
|
{
|
||
|
|
public class InkService
|
||
|
|
{
|
||
|
|
public async Task ExportInkAsync(string filePath)
|
||
|
|
{
|
||
|
|
await Task.Run(() =>
|
||
|
|
{
|
||
|
|
var dir = Path.GetDirectoryName(filePath);
|
||
|
|
if (!string.IsNullOrEmpty(dir) && !Directory.Exists(dir))
|
||
|
|
Directory.CreateDirectory(dir);
|
||
|
|
File.WriteAllText(filePath, "{\"message\":\"ink_export_placeholder\"}");
|
||
|
|
});
|
||
|
|
}
|
||
|
|
|
||
|
|
public async Task ImportInkAsync(string filePath)
|
||
|
|
{
|
||
|
|
await Task.Run(() =>
|
||
|
|
{
|
||
|
|
if (!File.Exists(filePath)) return;
|
||
|
|
});
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|