From 152d675cc6a53dc5a3528049216dd52d512084a7 Mon Sep 17 00:00:00 2001 From: Luigi Pinca Date: Thu, 6 May 2021 15:45:04 +0200 Subject: [PATCH] os: add os.devNull MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Provides the platform-specific file path of the null device. PR-URL: https://github.com/nodejs/node/pull/38569 Reviewed-By: James M Snell Reviewed-By: Colin Ihrig Reviewed-By: Rich Trott Reviewed-By: Darshan Sen Reviewed-By: Tobias Nießen --- doc/api/os.md | 12 ++++++++++++ lib/os.js | 7 +++++++ test/parallel/test-os.js | 7 +++++++ 3 files changed, 26 insertions(+) diff --git a/doc/api/os.md b/doc/api/os.md index f3d3f2d65249a4..f3e3f10c692ef4 100644 --- a/doc/api/os.md +++ b/doc/api/os.md @@ -122,6 +122,18 @@ The properties included on each object include: `nice` values are POSIX-only. On Windows, the `nice` values of all processors are always 0. +## `os.devNull` + + +* {string} + +The platform-specific file path of the null device. + +* `\\.\nul` on Windows +* `/dev/null` on POSIX + ## `os.endianness()`