Skip to content

Commit 1502944

Browse files
author
Cam Pedersen
committed
[doc] expand method definitions and examples
1 parent a86ccd0 commit 1502944

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,36 @@ scp.send(options, function (err) {
2929

3030
###scp.send(options, cb)
3131

32+
Send a file to a remote host (in your `~/.ssh/config`)
33+
34+
You must pass in `options. A `cb` function is optional, and will be passed `err`, `stdout`, and `stderr`.
35+
36+
There are currently 3 options:
37+
38+
````javascript
39+
scp.send({
40+
file: './file.txt', // local file to send
41+
host: 'myServer', // remote host to copy to, set up in your ~/.ssh/config
42+
path: '~' // remote path to save to (this would result in a ~/file.txt on myServer)
43+
});
44+
````
45+
3246
###scp.get(options, cb)
3347

48+
Transfer a file from a remote host (in your `~/.ssh/config`) to the current computer.
49+
50+
You must pass in `options. A `cb` function is optional, and will be passed `err`, `stdout`, and `stderr`.
51+
52+
There are currently 3 options:
53+
54+
````javascript
55+
scp.get({
56+
file: '~/file.txt', // remote file to grab
57+
host: 'myServer', // remote host to transfer from, set up in your ~/.ssh/config
58+
path: '~' // local path to save to (this would result in a ~/file.txt on the local machine)
59+
});
60+
````
61+
3462
## license
3563

3664
(The MIT License)

0 commit comments

Comments
 (0)