diff --git a/README.md b/README.md index 405d9313..3f2f238e 100644 --- a/README.md +++ b/README.md @@ -125,7 +125,7 @@ The `FtpSrv` class extends the [node net.Server](https://nodejs.org/api/net.html ### `login` ```js -on('login', {connection, username, password}, resolve, reject) => { ... } +on('login', ({connection, username, password}, resolve, reject) => { ... }); ``` Occurs when a client is attempting to login. Here you can resolve the login request by username and password. @@ -152,7 +152,7 @@ Occurs when a client is attempting to login. Here you can resolve the login requ ### `client-error` ```js -on('client-error', {connection, context, error}) => { ... } +on('client-error', ({connection, context, error}) => { ... }); ``` Occurs when an error arises in the client connection. @@ -161,6 +161,26 @@ Occurs when an error arises in the client connection. `context` string of where the error occured `error` error object +### `RETR` +```js +on('RETR', (error, filePath) => { ... }); +``` + +Occurs when a file is downloaded. + +`error` if successful, will be `null` +`filePath` location to which file was downloaded + +### `STOR` +```js +on('STOR', (error, fileName) => { ... }); +``` + +Occurs when a file is uploaded. + +`error` if successful, will be `null` +`fileName` name of the file that was downloaded + ## Supported Commands See the [command registry](src/commands/registration) for a list of all implemented FTP commands.