added original file node

This commit is contained in:
John Andrews
2022-02-10 08:20:14 +13:00
parent 987ed24074
commit 701d19cd45
3 changed files with 27 additions and 0 deletions

Binary file not shown.

View File

@@ -183,6 +183,12 @@
"DeleteOriginal-Help": "If the original file should be deleted, this will only happen if the working file is different to the original file"
}
},
"OriginalFile": {
"Description": "Sets the current working file in the flow to the original file that started the flow",
"Outputs": {
"1": "Working file set to original file"
}
},
"PatternMatch": {
"Description": "Tests the working file and original file against a regular expression.\n\nOutput 1: Matches expression\nOutput 2: Does not match",
"Outputs": {

View File

@@ -0,0 +1,21 @@
namespace FileFlows.BasicNodes.File
{
using System.Text;
using System.Text.RegularExpressions;
using FileFlows.Plugin;
public class OriginalFile : Node
{
public override int Inputs => 1;
public override int Outputs => 1;
public override string Icon => "fas fa-file";
public override FlowElementType Type => FlowElementType.Logic;
public override int Execute(NodeParameters args)
{
args.SetWorkingFile(args.FileName);
args.Logger?.ILog("Set working file to: " + args.FileName);
return 1;
}
}
}