Copy Resource


Node Information
Copies specified resource file to the specified location on disk. You need to specify the resource name include its extension (ex: file.txt).
General Information
• This node doesn't have other available options.
Visual
Visual

Ports
Text Type DataType Accepts IsList CustomAcception
Copy IN RUN MULTIPLE FALSE FALSE
Resource IN String MULTIPLE FALSE FALSE
Destination IN String MULTIPLE FALSE FALSE

Source
namespace Korduene.KGraph.Nodes.Application.Resources
{
    [IsNode("Copy Resource To Disk")]
    public class ResourceCopy : Node
    {
        Port run = new Port(PortType.IN, typeof(RUN), AcceptsLinks.MULTIPLE, "Copy");
        Port resName = new Port(PortType.IN, typeof(string), AcceptsLinks.MULTIPLE, "Resource");
        Port dest = new Port(PortType.IN, typeof(string), AcceptsLinks.MULTIPLE, "Destination");
        public string Destination { set { dest.Value = value; } get { return GetRuntimeValue(dest); } }
        public string Resource { set { resName.Value = value; } get { return GetRuntimeValue(resName); } }
        public ResourceCopy()
        {
            NodeType = KGraph.NodeType.Method;
            Destination = string.Empty;
            Resource = string.Empty;
            this.Name = "Copy Resource";
            this.AddPort(run);
            AddPort(resName);
            AddPort(dest);
            Information = "Copies specified resource file to the specified location on disk. " +
                "You need to specify the resource name include its extension (ex: file.txt).";
        }
        public override string Code()
        {
            return "ResMan.CopyRes(" + GetValue(resName) + "," + GetValue(dest) + ");";
        }
    }
}