Permalink
Browse files

Draft API changes and add compatibility information

  • Loading branch information...
1 parent 1dfce6d commit 7d28805b098c8cea07b75d7ec1189f524240a5a1 @Lejdborg Lejdborg committed Jun 30, 2012
Showing with 10 additions and 4 deletions.
  1. +10 −4 README.md
View
@@ -56,22 +56,28 @@ Are you using NMSSH for something cool? Let me know.
### Using Channels (not yet implemented)
- NSString *response = [session execute:@"echo foo"];
+#### Executing shell commands
+
+ NSString *response = [[session channel] execute:@"echo foo"];
NSLog(@"Response: %@", response);
-### SCP file transfer (not yet implemented)
+#### SCP file transfer
The SCP API provides a simple way to upload or download files.
The `to:` parameter is flexible in that if you provide a directory, it will keep the same filename as in the from-parameter. But if you provide a complete file name you may name the transferred file anything you want.
#### Uploading files from your local computer
- BOOL success = [session uploadFile:@"~/my-local-file.txt" to:@"/var/www/"];
+ BOOL success = [[session channel] uploadFile:@"~/my-local-file.txt" to:@"/var/www/"];
#### Downloading files from a server
- BOOL success = [session downloadFile:@"/var/www/my-remote-file.txt" to:@"~/"];
+ BOOL success = [[session channel] downloadFile:@"/var/www/my-remote-file.txt" to:@"~/"];
+
+## Compatibility
+
+NMSSH contains a pre-built libssh2 for Mac OSX. It should work just fine with iOS as well if you compile libssh2 yourself and switch the included `libssh2.dylib`.
## License

0 comments on commit 7d28805

Please sign in to comment.