#if(DEBUG) using FileFlows.Plugin; using FileFlows.Plugin.Models; using FileFlows.Plugin.Services; namespace BasicNodes.Tests; public class TestFileService : IFileService { public List Files { get; set; } public Result GetFiles(string path, string searchPattern = "", bool recursive = false) { if (Files?.Any() != true) return new string[] { }; if (searchPattern.StartsWith("*")) searchPattern = searchPattern[1..]; return Files.Where(x => x.EndsWith(searchPattern)).ToArray(); } public Result GetDirectories(string path) { throw new NotImplementedException(); } public Result DirectoryExists(string path) { throw new NotImplementedException(); } public Result DirectoryDelete(string path, bool recursive = false) { throw new NotImplementedException(); } public Result DirectoryMove(string path, string destination) { throw new NotImplementedException(); } public Result DirectoryCreate(string path) { throw new NotImplementedException(); } public Result DirectoryCreationTimeUtc(string path) { throw new NotImplementedException(); } public Result DirectoryLastWriteTimeUtc(string path) { throw new NotImplementedException(); } public Result FileExists(string path) { throw new NotImplementedException(); } public Result FileInfo(string path) { throw new NotImplementedException(); } public Result FileDelete(string path) { throw new NotImplementedException(); } public Result FileSize(string path) { throw new NotImplementedException(); } public Result FileCreationTimeUtc(string path) { throw new NotImplementedException(); } public Result FileLastWriteTimeUtc(string path) { throw new NotImplementedException(); } public Result FileMove(string path, string destination, bool overwrite = true) { throw new NotImplementedException(); } public Result FileCopy(string path, string destination, bool overwrite = true) { throw new NotImplementedException(); } public Result FileAppendAllText(string path, string text) { throw new NotImplementedException(); } public bool FileIsLocal(string path) { throw new NotImplementedException(); } public Result GetLocalPath(string path) { throw new NotImplementedException(); } public Result Touch(string path) { throw new NotImplementedException(); } public Result DirectorySize(string path) { throw new NotImplementedException(); } public Result SetCreationTimeUtc(string path, DateTime date) { throw new NotImplementedException(); } public Result SetLastWriteTimeUtc(string path, DateTime date) { throw new NotImplementedException(); } public char PathSeparator { get; init; } public ReplaceVariablesDelegate ReplaceVariables { get; set; } public ILogger? Logger { get; set; } } #endif