Extract Zip


Node Information
Extracts the specified Zip file to the specified directory.
General Information
• This node doesn't have other available options.
Visual
Visual

Ports
Text Type DataType Accepts IsList CustomAcception
Extract IN RUN MULTIPLE FALSE FALSE
Source IN String ONE FALSE FALSE
Destination IN String ONE FALSE FALSE

Source
namespace Korduene.KGraph.Nodes.IO.Zip
{
    [IsNode("Extract Zip")]
    public class ZipExtract : Node
    {
        Port run = new Port(PortType.IN, typeof(RUN), AcceptsLinks.MULTIPLE, "Extract");
        Port sourcepath = new Port(PortType.IN, typeof(string), AcceptsLinks.ONE, "Source");
        Port destpath = new Port(PortType.IN, typeof(string), AcceptsLinks.ONE, "Destination");
        public string Source
        {
            set { sourcepath.Value = value.ToString(); }
            get { return GetRuntimeValue(sourcepath); }
        }
        public string Destination
        {
            set { destpath.Value = value.ToString(); }
            get { return GetRuntimeValue(destpath); }
        }
        public ZipExtract()
        {
            this.Name = "Extract Zip";
            this.NodeType = KGraph.NodeType.Method;
            AddPort(run);
            AddPort(sourcepath);
            AddPort(destpath);
            Information = "Extracts the specified Zip file to the specified directory.";
        }
        public override string Code()
        {
            return "System.IO.Compression.ZipFile.ExtractToDirectory(" + GetValue(sourcepath) + "," + GetValue(destpath) + ");";
        }
    }
}