Skip to content

Commit

Permalink
Fix code sample in README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
bluekeyes committed Aug 3, 2015
1 parent c647d85 commit 59ca429
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 59ca429

Please sign in to comment.