mirror of
https://github.com/revenz/FileFlowsPlugins.git
synced 2026-03-01 15:30:06 -06:00
added original file node
This commit is contained in:
Binary file not shown.
@@ -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": {
|
||||
|
||||
21
BasicNodes/File/OriginalFile.cs
Normal file
21
BasicNodes/File/OriginalFile.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user