protected SystemNodeCommand(NodeFlow Flow) { this.HostNode = Flow.HostNode.NodeName; this.SourceNode = Flow.SourceNode.NodeName; this.TargetNode = Flow.TargetNode.NodeName; this.SpecName = FormatSpecName(HostNode, SourceNode, TargetNode); }
Option <FilePath> InvokedTransfer(Option <FilePath> result, NodeFlow flow, SystemResourceUrn urn) { result.Map( file => C.Notify(Inform($"{flow.SourceNode}:{file.FileName} ==> {flow.TargetNode}")), () => C.Notify(result.Message)); return(result); }
public Option <string> TransferFiles <S>(NodeFlow flow, string match = null) where S : CatalogSubject <S> => Summarize(map(Items(Catalog.Subject <S>(), flow.SourceNode, match), urn => Self.TransferFile(flow, urn)));
Option <FilePath> INodeFileSystemChannel.TransferFile(NodeFlow flow, SystemResourceUrn urn) => InvokedTransfer(TransferFile(flow, urn), flow, urn);
Option <FilePath> TransferFile(NodeFlow flow, SystemResourceUrn urn) => from srcFile in Locator.UncFilePath(flow.SourceNode, urn) from dstFile in Locator.UncFilePath(flow.TargetNode, urn) from result in srcFile.CopyTo(dstFile) select result;