コード例 #1
0
        public void TestRoot()
        {
            SftpOptions o = new SftpOptions();

            o.Host                 = host;
            o.User                 = user;
            o.Password             = password;
            o.AllowHostKeyChecking = false;
            SftpClient c = new SftpClient();

            c.Connect(o);
            bool put = c.Put(localPath, "/");

            True(put, c);
            bool get = c.Get("sftptest1.txt", localPath);

            True(get, c);
            c.Disconnect();
        }
コード例 #2
0
        private void TestPut(SftpClient client)
        {
            bool put = client.Put(localPath, remoteDir);

            True(put, client);
        }