Ejemplo n.º 1
0
        private static object RunPullAndReturnExitCode(PullOptions opts)
        {
            bool replaceExisting = true;

            Console.WriteLine("PullFileFromDevice(" + opts.Source + ", " + opts.Destination + ", " +
                              replaceExisting + ", " + opts.IP + ")");

            try
            {
                bool res = USBLAN.PullFileFromDevice(opts.Source, opts.Destination, replaceExisting, opts.IP);
                if (!res)
                {
                    Console.WriteLine("An error occurred.");
                    return(1);
                }
            }
            catch (Exception e)
            {
                PrintException(e);
                return(1);
            }

            Console.WriteLine("pull complete.");
            return(0);
        }
Ejemplo n.º 2
0
        private static void TestPullFileFromDevice()
        {
            bool result = USBLAN.PullFileFromDevice("/Temp/big.jpg", "C:/Users/mchew/Documents/IT_71796/pull.jpg", false);

            Console.WriteLine("response: " + result);
        }