From 59ca42907381ee9188271e2b0dc4a738f3c0677f Mon Sep 17 00:00:00 2001 From: Billy Keyes Date: Mon, 3 Aug 2015 10:34:33 -0700 Subject: [PATCH] Fix code sample in README.md --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 80bd7a8a..6a54e629 100644 --- a/README.md +++ b/README.md @@ -16,12 +16,11 @@ for command execution with remote implementations of the `java.nio.file` API introduced in Java 7. ```java -Host example = Host.fromHostname("example.com"); -SshHostAccessor ssh = SshHostAccessor.forPassword(example, "giraffe", "l0ngN3ck"); +SshHostAccessor ssh = SshHostAccessor.forPassword("example.com", "giraffe", "l0ngN3ck"); try (HostControlSystem hcs = ssh.open()) { Path logs = hcs.getPath("server/logs"); - Files.copy(logs.resolve("access.log"), Paths.get("log/example-access.log"); + Files.copy(logs.resolve("access.log"), Paths.get("log/example-access.log")); Command archive = hcs.getCommand("server/bin/archive.sh", "--format=zip", "logs"); Commands.execute(archive);