mirror of
https://github.com/cxfksword/jellyfin-plugin-danmu.git
synced 2026-02-02 17:59:58 +08:00
34 lines
791 B
C#
34 lines
791 B
C#
using System;
|
|
using System.IO;
|
|
using System.Text;
|
|
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Jellyfin.Plugin.Danmu.Core;
|
|
|
|
public class FileSystem : IFileSystem
|
|
{
|
|
public Task WriteAllBytesAsync(string path, byte[] bytes, CancellationToken cancellationToken = default)
|
|
{
|
|
return File.WriteAllBytesAsync(path, bytes, cancellationToken);
|
|
}
|
|
|
|
public Task WriteAllTextAsync(string path, string? contents, Encoding encoding, CancellationToken cancellationToken = default)
|
|
{
|
|
return File.WriteAllTextAsync(path, contents, cancellationToken);
|
|
}
|
|
|
|
public DateTime GetLastWriteTime(string path)
|
|
{
|
|
return File.GetLastWriteTime(path);
|
|
}
|
|
|
|
public bool Exists(string? path)
|
|
{
|
|
return File.Exists(path);
|
|
}
|
|
}
|
|
|
|
|
|
|