diff --git a/doc/api/fs.md b/doc/api/fs.md index a4a9e5fd3f2..ae559d0ecff 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -2749,8 +2749,21 @@ changes: * `callback` {Function} * `err` {Error} -Asynchronous unlink(2). No arguments other than a possible exception are given -to the completion callback. +Asynchronously removes a file or symbolic link. No arguments other than a +possible exception are given to the completion callback. + +```js +// Assuming that 'path/file.txt' is a regular file. +fs.unlink('path/file.txt', (err) => { + if (err) throw err; + console.log('path/file.txt was deleted'); +}); +``` + +`fs.unlink()` will not work on a directory, empty or otherwise. To remove a +directory, use [`fs.rmdir()`][]. + +See also: unlink(2) ## fs.unlinkSync(path) * `data` {string|Buffer} * `encoding` {string} * `callback` {Function} +* Returns: {this} Finishes sending the request. If any parts of the body are unsent, it will flush them to the stream. If the request is @@ -1041,11 +1046,16 @@ See [`response.socket`][]. ### response.end([data][, encoding][, callback]) * `data` {string|Buffer} * `encoding` {string} * `callback` {Function} +* Returns: {this} This method signals to the server that all of the response headers and body have been sent; that server should consider this message complete. diff --git a/doc/api/http2.md b/doc/api/http2.md index 66cf7aafa0f..efacbe149b7 100644 --- a/doc/api/http2.md +++ b/doc/api/http2.md @@ -1718,7 +1718,7 @@ changes: Http2ServerRequest class to use. Useful for extending the original `Http2ServerRequest`. **Default:** `Http2ServerRequest` - * `Http2ServerResponse` {htt2.Http2ServerResponse} Specifies the + * `Http2ServerResponse` {http2.Http2ServerResponse} Specifies the Http2ServerResponse class to use. Useful for extending the original `Http2ServerResponse`. **Default:** `Http2ServerResponse` @@ -2624,11 +2624,16 @@ See [`response.socket`][]. #### response.end([data][, encoding][, callback]) * `data` {string|Buffer} * `encoding` {string} * `callback` {Function} +* Returns: {this} This method signals to the server that all of the response headers and body have been sent; that server should consider this message complete. diff --git a/doc/api/stream.md b/doc/api/stream.md index 14be27cbf2d..c72873c466f 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -355,6 +355,9 @@ See also: [`writable.uncork()`][].