mirror of
https://github.com/revenz/FileFlowsPlugins.git
synced 2026-01-06 07:09:49 -06:00
added logging to touch
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting.Logging;
|
||||
|
||||
namespace FileFlows.BasicNodes.File;
|
||||
|
||||
using FileFlows.Plugin;
|
||||
@@ -20,9 +22,11 @@ public class Touch : Node
|
||||
string filename = args.ReplaceVariables(this.FileName ?? string.Empty, stripMissing: true);
|
||||
if (string.IsNullOrEmpty(filename))
|
||||
filename = args.WorkingFile;
|
||||
|
||||
|
||||
if (IsDirectory(filename))
|
||||
{
|
||||
args.Logger?.ILog("Touching directory: " + filename);
|
||||
try
|
||||
{
|
||||
var dir = new DirectoryInfo(filename);
|
||||
@@ -37,6 +41,7 @@ public class Touch : Node
|
||||
}
|
||||
else
|
||||
{
|
||||
args.Logger?.ILog("Touching file: " + filename);
|
||||
try
|
||||
{
|
||||
if (System.IO.File.Exists(filename))
|
||||
|
||||
Reference in New Issue
Block a user