Ejemplo n.º 1
0
        public Status SendFile(RioFile file)
        {
            /* This will only happen on second tab, so don't bother logging */
            Status     error  = Status.Ok;
            SftpClient client = new SftpClient(_host.GetHostName(), "admin", "");

            /* Check if file exists on PC */
            if (error == Status.Ok)
            {
                if (file.CheckExistanceOnPC() == false)
                {
                    /* could not open file? */
                    Log("  Could not open file:" + file.TargetPath);
                    error = Status.CouldNotOpenFile;
                }
            }

            return(SendFileContents(file.GetContents(), file.TargetPath));
        }
        public Status SendFile(RioFile file)
        {
            /* This will only happen on second tab, so don't bother logging */
            Status error = Status.Ok;

            /* Check if file exists on PC */
            if (error == Status.Ok)
            {
                if (file.CheckExistanceOnPC() == false)
                {
                    /* could not open file? */
                    Log("  Could not open file:" + file.TargetPath);
                    error = Status.CouldNotOpenFile;
                }
            }

            if (error == Status.Ok)
            {
                error = SendFileContents(file.GetContents(), file.TargetPath);
            }
            return(error);
        }