Skip to content

Commit

Permalink
Merge pull request #8 from zazuko/docs
Browse files Browse the repository at this point in the history
docs: document package operations in README
  • Loading branch information
martinmaillard authored Dec 3, 2019
2 parents a562543 + 17c84cf commit a4e3d8b
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions packages/ftp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,45 @@ The pipeline can be started like this:
```bash
./node_modules/.bin/barnard59 run --format=text/turtle --pipeline=http://example.org/pipeline#pipeline --verbose examples/list.ttl
```

## Operations

This package provides operations to make single requests to an FTP server. The
following options are common to all the operations.

Common options:
- `protocol` (*string*): "ftp" (default) or "sftp"
- `host` (*string*): Hostname or IP address of the server (default "localhost")
- `port` (*integer*): Port number of the server (default 21 for FTP, 22 for SFTP)
- `user` (*string*): Username for authentication
- `password` (*string*): Password for password-based authentication
- `privateKey` (*mixed*): (SFTP-only) Buffer or string that contains a private
key for either key-based or hostbased user authentication (OpenSSH format).
- `passphrase` (*string*): (SFTP-only) For an encrypted private key, this is
the passphrase used to decrypt it.

### list

List files in a given remote directory. Returns a stream of file names.

Options:
- `pathname` (*string*): Path of the directory to list
- All the common options defined above

### read

Read the content of a remote file at a given path. Returns a stream of
string data.

Options:
- `filename` (*string*): Path of the file to read
- All the common options defined above

### move

Move a remote file from one path to another.

Options:
- `source` (*string*): Source path
- `target` (*string*): Target path
- All the common options defined above

0 comments on commit a4e3d8b

Please sign in to comment.