Example #1
0
        private static object RunPushAndReturnExitCode(PushOptions opts)
        {
            bool replaceExisting = true;

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

            try
            {
                bool res = USBLAN.PushFileToDevice(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("push complete.");
            return(0);
        }
Example #2
0
        private static void TestPushFileToDevice()
        {
            bool result = USBLAN.PushFileToDevice("C:/Users/mchew/Documents/IT_71796/big.jpg", "/Temp/big.jpg", false);

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